From 5818f2ed892b54382d14549679d52ffa66173a8a Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sat, 18 Apr 2015 23:22:11 +0800 Subject: x264: add test --- Library/Formula/x264.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Library') 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 + #include + + 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 -- cgit v1.2.3