From 5abd69751d136d4e6bb826eb2c98bc71d1cdac98 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Wed, 2 Sep 2015 21:47:56 +1000 Subject: [PATCH] gjstest 1.0.1 (new formula) There was a gjstest formula in the past, but it stopped building due to v8 issues and was removed. As of the v8 upgrade in 9dae089, this can work again. For google/gjstest#3. Closes Homebrew/homebrew#43457. Signed-off-by: Alex Dunn --- Formula/gjstest.rb | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Formula/gjstest.rb diff --git a/Formula/gjstest.rb b/Formula/gjstest.rb new file mode 100644 index 0000000000..294f1ccbaa --- /dev/null +++ b/Formula/gjstest.rb @@ -0,0 +1,34 @@ +class Gjstest < Formula + desc "Fast javascript unit testing framework that runs on the V8 engine." + homepage "https://github.com/google/gjstest" + url "https://github.com/google/gjstest/archive/v1.0.1.tar.gz" + sha256 "c64d1b8d153b9afaa17ce521d9a7d07acbf13838dab7b2e57822f0bf046f80e5" + head "https://github.com/google/gjstest.git" + + depends_on :macos => :mavericks + + depends_on "gflags" + depends_on "glog" + depends_on "libxml2" + depends_on "protobuf" + depends_on "re2" + depends_on "v8" + + def install + system "make", "PREFIX=#{prefix}", "install" + end + + test do + (testpath/"sample_test.js").write <<-EOF + function SampleTest() { + } + registerTestSuite(SampleTest); + + addTest(SampleTest, function twoPlusTwoEqualsFour() { + expectEq(4, 2+2); + }); + EOF + + system "#{bin}/gjstest", "--js_files", "#{testpath}/sample_test.js" + end +end