aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/x264.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Formula/x264.rb b/Library/Formula/x264.rb
index f3eda70bf..2301063fc 100644
--- a/Library/Formula/x264.rb
+++ b/Library/Formula/x264.rb
@@ -48,4 +48,22 @@ class X264 < Formula
system "./configure", *args
system "make", "install"
end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <stdint.h>
+ #include <x264.h>
+
+ int main()
+ {
+ x264_picture_t pic;
+ x264_picture_init(&pic);
+ x264_picture_alloc(&pic, 1, 1, 1);
+ x264_picture_clean(&pic);
+ return 0;
+ }
+ EOS
+ system ENV.cc, "-lx264", "test.c", "-o", "test"
+ system "./test"
+ end
end