aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAnil Madhavapeddy2014-10-27 19:02:08 +0000
committerMike McQuaid2014-10-28 08:26:19 +0000
commitf4e3469f52209cdd662d6e50f7a119a4f4bfaac4 (patch)
tree3e2fc324a03f69ba72db872021dee13fc9a31d9e /Library
parentd0a0c159fa1f6a010853d11b0640648c6e6bb166 (diff)
downloadhomebrew-f4e3469f52209cdd662d6e50f7a119a4f4bfaac4.tar.bz2
camlp4: add missing version, and add testcase
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/camlp4.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Formula/camlp4.rb b/Library/Formula/camlp4.rb
index 0eb0a7d67..124f97ac4 100644
--- a/Library/Formula/camlp4.rb
+++ b/Library/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"
@@ -17,4 +18,11 @@ class Camlp4 < Formula
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