Skip to content

Commit

Permalink
libtorrent: Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
sjackman authored and MikeMcQuaid committed Apr 7, 2016
1 parent a2b2077 commit eab3b0d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Formula/libtorrent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,19 @@ def install
system "make"
system "make", "install"
end

test do
(testpath/"sample.cc").write <<-EOS.undent
#include <iostream>
#include <torrent/torrent.h>
int main(int argc, char* *argv)
{
std::cout << torrent::version();
return 0;
}
EOS

system ENV.cxx, "-o", "sample", "sample.cc", "-ltorrent"
system "./sample"
end
end

0 comments on commit eab3b0d

Please sign in to comment.