aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Christenson2014-10-13 14:12:59 -0600
committerMike McQuaid2014-10-13 21:38:20 +0100
commit75d404ec442b4099339f944bfdab0469ac7d14ab (patch)
tree4e05636e0ace4b6b9948b1dc42902f20678d7f67
parent6fc3156da5327759062d0aff41add9d004bc23bb (diff)
downloadhomebrew-75d404ec442b4099339f944bfdab0469ac7d14ab.tar.bz2
ragel: add test
-rw-r--r--Library/Formula/ragel.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/Library/Formula/ragel.rb b/Library/Formula/ragel.rb
index 8764050a4..e79f1798b 100644
--- a/Library/Formula/ragel.rb
+++ b/Library/Formula/ragel.rb
@@ -15,4 +15,21 @@ class Ragel < Formula
system "make", "install"
doc.install resource("pdf")
end
+
+ test do
+ testfile = testpath/"rubytest.rl"
+ testfile.write <<-EOS.undent
+ %%{
+ machine homebrew_test;
+ main := ( 'h' @ { puts "homebrew" }
+ | 't' @ { puts "test" }
+ )*;
+ }%%
+ data = 'ht'
+ %% write data;
+ %% write init;
+ %% write exec;
+ EOS
+ system "ragel", "-Rs", testfile
+ end
end