homebrew-core/Formula/jflex.rb

22 lines
620 B
Ruby
Raw Normal View History

class Jflex < Formula
desc "Lexical analyzer generator for Java, written in Java."
homepage "http://jflex.de/"
url "http://jflex.de/release/jflex-1.6.1.zip"
sha256 "6da3c573db065f535c9b544e46ab4d49caa629b0354f8340df027f35e3368a51"
2016-03-02 06:24:40 +00:00
bottle :unneeded
depends_on :java => "1.7+"
def install
2016-03-02 06:24:40 +00:00
pkgshare.install "examples"
libexec.install "lib/jflex-#{version}.jar"
bin.write_jar_script libexec/"jflex-#{version}.jar", "jflex"
end
test do
2016-03-02 06:24:40 +00:00
system bin/"jflex", "-d", testpath, pkgshare/"examples/java/java.flex"
assert_match /public static void/, (testpath/"Scanner.java").read
end
end