sdl2_image: add test (#23213)

master
Adam Buckland 2018-01-24 07:45:53 +00:00 committed by FX Coudert
parent 99867fdbdc
commit ebc1f1ee1b
1 changed files with 15 additions and 0 deletions

View File

@ -30,4 +30,19 @@ class Sdl2Image < Formula
"--disable-webp-shared" "--disable-webp-shared"
system "make", "install" system "make", "install"
end end
test do
(testpath/"test.c").write <<~EOS
#include <SDL2/SDL_image.h>
int main()
{
int success = IMG_Init(0);
IMG_Quit();
return success;
}
EOS
system ENV.cc, "-L#{lib}", "-lsdl2_image", "test.c", "-o", "test"
system "./test"
end
end end