pike: add test

Closes Homebrew/homebrew#28161.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Mike Naberezny 2014-04-04 18:24:14 -07:00 committed by Jack Nagel
parent d6d9763651
commit 2bfa514246

View file

@ -98,4 +98,18 @@ class Pike < Formula
bin.install_symlink "#{libexec}/bin/pike"
share.install_symlink "#{libexec}/share/man"
end
test do
path = testpath/"test.pike"
path.write <<-EOS.undent
int main() {
for (int i=0; i<10; i++) { write("%d", i); }
return 0;
}
EOS
out = `#{bin}/pike #{path}`
assert_equal "0123456789", out
assert_equal 0, $?.exitstatus
end
end