2015-09-02 11:47:56 +00:00
|
|
|
class Gjstest < Formula
|
|
|
|
desc "Fast javascript unit testing framework that runs on the V8 engine."
|
|
|
|
homepage "https://github.com/google/gjstest"
|
2015-10-14 04:01:03 +00:00
|
|
|
url "https://github.com/google/gjstest/archive/v1.0.2.tar.gz"
|
|
|
|
sha256 "7bf0de1c4b880b771a733c9a5ce07c71b93f073e6acda09bec7e400c91c2057c"
|
2015-11-12 13:35:51 +00:00
|
|
|
revision 1
|
|
|
|
|
2015-09-02 11:47:56 +00:00
|
|
|
head "https://github.com/google/gjstest.git"
|
|
|
|
|
2015-09-03 14:16:33 +00:00
|
|
|
bottle do
|
2015-11-12 14:30:55 +00:00
|
|
|
sha256 "3d163ee60a23ec3b70dc0da03c16c7515b897aa8e1485ab2571d961ccd79a425" => :el_capitan
|
|
|
|
sha256 "d9ff351be0d6596011db1e36593ad9173e23cf484c9036aa999af1ef0eb2ab31" => :yosemite
|
|
|
|
sha256 "d9236d81466408f87673d574927366059ad1bbb9f37a9e3660565fd7edcd4351" => :mavericks
|
2015-09-03 14:16:33 +00:00
|
|
|
end
|
|
|
|
|
2015-09-02 11:47:56 +00:00
|
|
|
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
|