95f40126e4
Use make install with prefix Add more tests Closes #41955. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
21 lines
635 B
Ruby
21 lines
635 B
Ruby
class Quickjs < Formula
|
|
desc "Small and embeddable JavaScript engine"
|
|
homepage "https://bellard.org/quickjs/"
|
|
url "https://bellard.org/quickjs/quickjs-2019-07-09.tar.xz"
|
|
sha256 "350c1cd9dd318ad75e15c9991121c80b85c2ef873716a8900f811554017cd564"
|
|
|
|
def install
|
|
system "make", "install", "prefix=#{prefix}"
|
|
end
|
|
|
|
test do
|
|
output = shell_output("#{bin}/qjs -e 'console.log(\"hello\");'").strip
|
|
assert_equal "hello", output
|
|
|
|
path = testpath/"test.js"
|
|
path.write "console.log('hello');"
|
|
system "#{bin}/qjsc", path
|
|
output = shell_output(testpath/"a.out").strip
|
|
assert_equal "hello", output
|
|
end
|
|
end
|