diff options
| author | Xu Cheng | 2014-12-28 22:39:26 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-28 16:58:52 +0000 |
| commit | 7a648c0e65c08058e9614fc0659c8431274cdf26 (patch) | |
| tree | 1c982d2eec129cf6393fa48eeae3369368ec6258 /Library/Formula/mpfr.rb | |
| parent | c337148273221915e7a04483d7ea209f7daa4533 (diff) | |
| download | homebrew-7a648c0e65c08058e9614fc0659c8431274cdf26.tar.bz2 | |
mpfr: add test
Diffstat (limited to 'Library/Formula/mpfr.rb')
| -rw-r--r-- | Library/Formula/mpfr.rb | 17 |
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 |
