sdl2_mixer: add test (#23216)

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

View File

@ -45,4 +45,19 @@ class Sdl2Mixer < Formula
system "./configure", *args
system "make", "install"
end
test do
(testpath/"test.c").write <<~EOS
#include <SDL2/SDL_mixer.h>
int main()
{
int success = Mix_Init(0);
Mix_Quit();
return success;
}
EOS
system ENV.cc, "-L#{lib}", "-lsdl2_mixer", "test.c", "-o", "test"
system "./test"
end
end