diff options
| author | Mike Naberezny | 2014-04-25 10:48:20 -0700 |
|---|---|---|
| committer | Jack Nagel | 2014-04-25 20:13:22 -0500 |
| commit | c3b6a031d4a6161c57bbfb2b22959c9798bfb022 (patch) | |
| tree | bfbe833b03d10ecc62dae660646cb9011108b6c3 /Library/Formula | |
| parent | 48005e8da8d6eac8d91d51584f0643a877f6e021 (diff) | |
| download | homebrew-c3b6a031d4a6161c57bbfb2b22959c9798bfb022.tar.bz2 | |
parrot: add test
Closes #28715.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/parrot.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Formula/parrot.rb b/Library/Formula/parrot.rb index b7d24bcf7..83bfad98c 100644 --- a/Library/Formula/parrot.rb +++ b/Library/Formula/parrot.rb @@ -31,4 +31,22 @@ class Parrot < Formula # Don't install this file in HOMEBREW_PREFIX/lib rm_rf lib/'VERSION' end + + test do + path = testpath/"test.pir" + path.write <<-EOS.undent + .sub _main + .local int i + i = 0 + loop: + print i + inc i + if i < 10 goto loop + .end + EOS + + out = `#{bin}/parrot #{path}` + assert_equal "0123456789", out + assert_equal 0, $?.exitstatus + end end |
