luajit: add test

master
Jack Nagel 2013-11-12 13:48:46 -06:00
parent 76a7d6f744
commit edf4b34500
1 changed files with 8 additions and 0 deletions

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