aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorXu Cheng2014-12-28 22:33:50 +0800
committerMike McQuaid2014-12-28 16:58:52 +0000
commit605e19ff169867f974f64a898eaa0d7474114a83 (patch)
tree9d642911499f30e14719e347fd70ebd9d970d4af /Library/Formula
parent357c95ea9681b00aa2834d5dd15a0517240432b3 (diff)
downloadhomebrew-605e19ff169867f974f64a898eaa0d7474114a83.tar.bz2
gmp: add test
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/gmp.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/Library/Formula/gmp.rb b/Library/Formula/gmp.rb
index 705319abf..3606d4b2f 100644
--- a/Library/Formula/gmp.rb
+++ b/Library/Formula/gmp.rb
@@ -35,4 +35,20 @@ class Gmp < Formula
ENV.deparallelize
system "make", "install"
end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <gmp.h>
+
+ int main()
+ {
+ mpz_t integ;
+ mpz_init (integ);
+ mpz_clear (integ);
+ return 0;
+ }
+ EOS
+ system ENV.cc, "test.c", "-lgmp", "-o", "test"
+ system "./test"
+ end
end