aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/mpfr.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/Library/Formula/mpfr.rb b/Library/Formula/mpfr.rb
index 4fe6e3279..da34a6a19 100644
--- a/Library/Formula/mpfr.rb
+++ b/Library/Formula/mpfr.rb
@@ -39,4 +39,21 @@ class Mpfr < Formula
system "make", "check"
system "make", "install"
end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <gmp.h>
+ #include <mpfr.h>
+
+ int main()
+ {
+ mpfr_t x;
+ mpfr_init(x);
+ mpfr_clear(x);
+ return 0;
+ }
+ EOS
+ system ENV.cc, "test.c", "-lgmp", "-lmpfr", "-o", "test"
+ system "./test"
+ end
end