lolcode: add test

Closes Homebrew/homebrew#28579.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Mike Naberezny 2014-04-21 09:57:27 -07:00 committed by Adam Vandenberg
parent bc796d3c1e
commit b4de757aa7

View file

@ -16,4 +16,18 @@ class Lolcode < Formula
# Don't use `make install` for this one file
bin.install 'lci'
end
test do
path = testpath/"test.lol"
path.write <<-EOS.undent
HAI 1.2
CAN HAS STDIO?
VISIBLE "HAI WORLD"
KTHXBYE
EOS
output = `#{bin}/lci #{path}`
assert_equal "HAI WORLD\n", output
assert_equal 0, $?.exitstatus
end
end