x264: add test

This commit is contained in:
Xu Cheng 2015-04-18 23:22:11 +08:00
parent 92f0fbba69
commit a436830bf7

View file

@ -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