aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/lolcode.rb
diff options
context:
space:
mode:
authorMike Naberezny2014-04-21 09:57:27 -0700
committerAdam Vandenberg2014-04-21 20:03:28 -0700
commit6295d4f35e01e6e0afea942869926cc78d325f56 (patch)
tree2600d96f144436a4fbd7c1aef6294e08fe414ed9 /Library/Formula/lolcode.rb
parent0f8c664ed37990f9336c7cd3d486f84b53ff3f0c (diff)
downloadhomebrew-6295d4f35e01e6e0afea942869926cc78d325f56.tar.bz2
lolcode: add test
Closes #28579. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/lolcode.rb')
-rw-r--r--Library/Formula/lolcode.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Formula/lolcode.rb b/Library/Formula/lolcode.rb
index 64825344c..b104bdca1 100644
--- a/Library/Formula/lolcode.rb
+++ b/Library/Formula/lolcode.rb
@@ -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