aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2013-11-12 13:48:46 -0600
committerJack Nagel2013-11-12 13:48:46 -0600
commitdca614b7c832774f29385ba3abd589f57e40bcae (patch)
tree75649c83ebe76f60e0bcb869c0f69d5535d5000c /Library/Formula
parentfab0c0b6987b4f9b9c7543432e7fd6eb7e27c0e6 (diff)
downloadhomebrew-dca614b7c832774f29385ba3abd589f57e40bcae.tar.bz2
luajit: add test
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/luajit.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Formula/luajit.rb b/Library/Formula/luajit.rb
index bead80ba3..6efcc8b95 100644
--- a/Library/Formula/luajit.rb
+++ b/Library/Formula/luajit.rb
@@ -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