From f4e3469f52209cdd662d6e50f7a119a4f4bfaac4 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Mon, 27 Oct 2014 19:02:08 +0000 Subject: camlp4: add missing version, and add testcase --- Library/Formula/camlp4.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library/Formula') 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 -- cgit v1.2.3