diff options
| author | Xu Cheng | 2014-12-30 18:28:24 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-30 11:00:18 +0000 |
| commit | 9d1570ede4ef8a47829bab05837ddd2a8112523c (patch) | |
| tree | a011e6101a1dd13a0410a61f5206f0a5bcecc946 /Library/Formula | |
| parent | 859e678ffff22daca721fb7cb7ba3c25852c861a (diff) | |
| download | homebrew-9d1570ede4ef8a47829bab05837ddd2a8112523c.tar.bz2 | |
libmpc: add test
Closes #35354.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/libmpc.rb | 16 |
1 files changed, 16 insertions, 0 deletions
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 <mpc.h> + + 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 |
