diff --git a/Formula/lzo.rb b/Formula/lzo.rb index 92efa8a1e64be..a377e2626b8c2 100644 --- a/Formula/lzo.rb +++ b/Formula/lzo.rb @@ -19,4 +19,20 @@ def install system "make", "check" system "make", "install" end + + test do + (testpath/"test.c").write <<-EOS.undent + #include + #include + + 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