diff options
| author | Xu Cheng | 2015-04-18 23:22:11 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-04-18 23:22:11 +0800 |
| commit | 5818f2ed892b54382d14549679d52ffa66173a8a (patch) | |
| tree | 4983d8fcfd90c58bd65d438468cd0069b3337622 /Library | |
| parent | 2bac36d4fd67b457d4c13a55f55e08d10de9d70b (diff) | |
| download | homebrew-5818f2ed892b54382d14549679d52ffa66173a8a.tar.bz2 | |
x264: add test
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/x264.rb | 18 |
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 |
