check: added test to formula

Closes #10369.

Signed-off-by: Tomasz Pajor <tomek@polishgeeks.com>
This commit is contained in:
Nicholas Humfrey 2017-02-26 18:21:21 +00:00 committed by Tomasz Pajor
parent bea0ebe3f1
commit 5f05fdfdf1

View file

@ -18,4 +18,16 @@ class Check < Formula
"--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"test.tc").write <<-EOS.undent
#test test1
ck_assert_msg(1, "This should always pass");
EOS
system "#{bin/"checkmk"} test.tc > test.c"
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lcheck", "-o", "test"
system "./test"
end
end