From b4de757aa76f36d3fc3586bbb8b6099417af8663 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Mon, 21 Apr 2014 09:57:27 -0700 Subject: [PATCH] lolcode: add test Closes Homebrew/homebrew#28579. Signed-off-by: Adam Vandenberg --- Formula/lolcode.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Formula/lolcode.rb b/Formula/lolcode.rb index 64825344cf..b104bdca1b 100644 --- a/Formula/lolcode.rb +++ b/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