From 9d1570ede4ef8a47829bab05837ddd2a8112523c Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Tue, 30 Dec 2014 18:28:24 +0800 Subject: libmpc: add test Closes #35354. Signed-off-by: Mike McQuaid --- Library/Formula/libmpc.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Library') diff --git a/Library/Formula/libmpc.rb b/Library/Formula/libmpc.rb index 2dce0c180..fcdb84d27 100644 --- a/Library/Formula/libmpc.rb +++ b/Library/Formula/libmpc.rb @@ -27,4 +27,20 @@ class Libmpc < Formula system "make", "check" system "make", "install" end + + test do + (testpath/"test.c").write <<-EOS.undent + #include + + int main() + { + mpc_t x; + mpc_init2 (x, 256); + mpc_clear (x); + return 0; + } + EOS + system ENV.cc, "test.c", "-lgmp", "-lmpfr", "-lmpc", "-o", "test" + system "./test" + end end -- cgit v1.2.3