From f77669697aa8a38b3a2825d0d9969953fbbd873e Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sun, 28 Dec 2014 22:53:58 +0800 Subject: mpfi: add test Closes #35313. Signed-off-by: Mike McQuaid --- Library/Formula/mpfi.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/mpfi.rb b/Library/Formula/mpfi.rb index a921a2c25..09c731db1 100644 --- a/Library/Formula/mpfi.rb +++ b/Library/Formula/mpfi.rb @@ -15,4 +15,20 @@ class Mpfi < Formula system "make", "check" system "make", "install" end + + test do + (testpath/"test.c").write <<-EOS.undent + #include + + int main() + { + mpfi_t x; + mpfi_init(x); + mpfi_clear(x); + return 0; + } + EOS + system ENV.cc, "test.c", "-lgmp", "-lmpfr", "-lmpfi", "-o", "test" + system "./test" + end end -- cgit v1.2.3