x264: add test
This commit is contained in:
parent
92f0fbba69
commit
a436830bf7
1 changed files with 18 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue