aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2014-12-28 22:39:26 +0800
committerMike McQuaid2014-12-28 16:58:52 +0000
commit7a648c0e65c08058e9614fc0659c8431274cdf26 (patch)
tree1c982d2eec129cf6393fa48eeae3369368ec6258 /Library
parentc337148273221915e7a04483d7ea209f7daa4533 (diff)
downloadhomebrew-7a648c0e65c08058e9614fc0659c8431274cdf26.tar.bz2
mpfr: add test
Diffstat (limited to 'Library')
-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