Skip to content

Commit

Permalink
camlp4: add missing version, and add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
avsm authored and MikeMcQuaid committed Oct 28, 2014
1 parent 4ad70cc commit a91cd15
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Formula/camlp4.rb
@@ -1,6 +1,7 @@
require "formula"

class Camlp4 < Formula
version '4.02.1+1'
homepage "https://github.com/ocaml/camlp4"
url "https://github.com/ocaml/camlp4/archive/4.02.1+1.tar.gz"
sha1 "7d0f879517887299167f1c3eefa8f4d266d69183"
Expand All @@ -17,4 +18,11 @@ def install
system "make", "all"
system "make", "install"
end

test do
(testpath/"foo.ml").write("type t = Homebrew | Rocks")
system "#{bin}/camlp4", "-parser", "OCaml", "-printer", "OCamlr", "foo.ml", "-o", (testpath/"foo.ml.out")
assert_equal "type t = [ Homebrew | Rocks ];", (testpath/"foo.ml.out").read.strip
end

end

0 comments on commit a91cd15

Please sign in to comment.