sdl2_net: add test (#23217)

master
Adam Buckland 2018-01-24 07:46:18 +00:00 committed by FX Coudert
parent 4ff2ddb636
commit fdccf4e08f
1 changed files with 16 additions and 0 deletions

View File

@ -23,4 +23,20 @@ class Sdl2Net < Formula
"--prefix=#{prefix}", "--disable-sdltest"
system "make", "install"
end
test do
(testpath/"test.c").write <<~EOS
#include <SDL2/SDL_net.h>
int main()
{
int success = SDLNet_Init();
SDLNet_Quit();
return success;
}
EOS
system ENV.cc, "-L#{lib}", "-lsdl2_net", "test.c", "-o", "test"
system "./test"
end
end