Skip to content

Commit

Permalink
libevent: add test
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#35326.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
xu-cheng authored and jacknagel committed Dec 29, 2014
1 parent 8636476 commit 3f5c921
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Formula/libevent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,20 @@ def install
man3.install Dir["doxygen/man/man3/*.3"]
end
end

test do
(testpath/"test.c").write <<-EOS.undent
#include <event2/event.h>
int main()
{
struct event_base *base;
base = event_base_new();
event_base_free(base);
return 0;
}
EOS
system ENV.cc, "test.c", "-levent", "-o", "test"
system "./test"
end
end

0 comments on commit 3f5c921

Please sign in to comment.