diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/visitors.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Formula/visitors.rb b/Library/Formula/visitors.rb index 7d6b36517..7db6eac7c 100644 --- a/Library/Formula/visitors.rb +++ b/Library/Formula/visitors.rb @@ -12,4 +12,13 @@ class Visitors < Formula bin.install "visitors" man1.install "visitors.1" end + + test do + IO.popen("#{bin}/visitors - -o text 2>&1", "w+") do |pipe| + pipe.puts 'a:80 1.2.3.4 - - [01/Apr/2014:14:28:00 -0400] "GET /1 HTTP/1.1" 200 9 - -' + pipe.puts 'a:80 1.2.3.4 - - [01/Apr/2014:14:28:01 -0400] "GET /2 HTTP/1.1" 200 9 - -' + pipe.close_write + assert pipe.read.include?("Different pages requested: 2") + end + end end |
