luajit: add test

This commit is contained in:
Jack Nagel 2013-11-12 13:48:46 -06:00
parent 76a7d6f744
commit edf4b34500

View file

@ -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