luajit: add test
This commit is contained in:
parent
76a7d6f744
commit
edf4b34500
1 changed files with 8 additions and 0 deletions
|
@ -28,4 +28,12 @@ class Luajit < Formula
|
|||
|
||||
system 'make', 'amalg', 'install', *args
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/luajit", "-e", <<-EOS.strip
|
||||
local ffi = require("ffi")
|
||||
ffi.cdef("int printf(const char *fmt, ...);")
|
||||
ffi.C.printf("Hello %s!\\n", "#{ENV['USER']}")
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue