Skip to content

Commit

Permalink
lzo: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
DomT4 authored and fxcoudert committed Apr 6, 2017
1 parent 7c2820f commit 6dca5c5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Formula/lzo.rb
Expand Up @@ -19,4 +19,20 @@ def install
system "make", "check"
system "make", "install"
end

test do
(testpath/"test.c").write <<-EOS.undent
#include <lzo/lzoconf.h>
#include <stdio.h>
int main()
{
printf("Testing LZO v%s in Homebrew.\\n",
LZO_VERSION_STRING);
return 0;
}
EOS
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-o", "test"
assert_match "Testing LZO v#{version} in Homebrew.", shell_output("./test")
end
end

0 comments on commit 6dca5c5

Please sign in to comment.