forked from Homebrew/legacy-homebrew
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
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 "gflags" | ||
depends_on "glog" | ||
depends_on "libxml2" | ||
depends_on "protobuf" | ||
depends_on "re2" | ||
depends_on "v8" | ||
|
||
def install | ||
# Require C++11 mode, even on OS X versions before 10.9. | ||
ENV.libcxx | ||
|
||
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 |