libbs2b: add test (#48435)

master
Adam Buckland 2019-12-31 18:23:22 +00:00 committed by FX Coudert
parent 377da12dea
commit 6c853cfce4
1 changed files with 18 additions and 0 deletions

View File

@ -25,4 +25,22 @@ class Libbs2b < Formula
"--enable-shared"
system "make", "install"
end
test do
(testpath/"test.c").write <<~EOS
#include <bs2b/bs2b.h>
int main()
{
t_bs2bdp info = bs2b_open();
if (info == 0)
{
return 1;
}
return 0;
}
EOS
system ENV.cc, "-L#{lib}", "-lbs2b", "test.c", "-o", "test"
system "./test"
end
end