aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorHannu Hartikainen2014-12-27 23:31:31 +0200
committerMisty De Meo2014-12-27 14:52:16 -0800
commit8eaed32a389b90d1f90d9f9276e1b39216fb4f15 (patch)
tree1ca67a65691d4123decdb48c4e0079e9650c07fb /Library/Formula
parent1bf81f9f5d547a3f998bf761708b1ca957d0d4f0 (diff)
downloadhomebrew-8eaed32a389b90d1f90d9f9276e1b39216fb4f15.tar.bz2
tcc: add a test (hello world with `tcc -run`)
Closes #35295. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/tcc.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Formula/tcc.rb b/Library/Formula/tcc.rb
index 8483fba9d..c63137bde 100644
--- a/Library/Formula/tcc.rb
+++ b/Library/Formula/tcc.rb
@@ -14,4 +14,16 @@ class Tcc < Formula
system "make", "install"
system "make", "test"
end
+
+ test do
+ (testpath/"hello-c.c").write <<-EOS.undent
+ #include <stdio.h>
+ int main()
+ {
+ puts("Hello, world!");
+ return 0;
+ }
+ EOS
+ assert_equal "Hello, world!\n", shell_output("#{bin}/tcc -run hello-c.c")
+ end
end