sdl2_image: add test (#23213)

This commit is contained in:
Adam Buckland 2018-01-24 07:45:53 +00:00 committed by FX Coudert
parent 99867fdbdc
commit ebc1f1ee1b

View file

@ -30,4 +30,19 @@ class Sdl2Image < Formula
"--disable-webp-shared"
system "make", "install"
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