grepcidr: add test (#33473)
This commit is contained in:
parent
74231c5dfa
commit
92479a26a3
1 changed files with 12 additions and 0 deletions
|
@ -19,4 +19,16 @@ class Grepcidr < Formula
|
|||
bin.install "grepcidr"
|
||||
man1.install "grepcidr.1"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"access.log").write <<~EOS
|
||||
127.0.0.1 duck
|
||||
8.8.8.8 duck
|
||||
66.249.64.123 goose
|
||||
192.168.0.1 duck
|
||||
EOS
|
||||
|
||||
output = shell_output("#{bin}/grepcidr 66.249.64.0/19 access.log")
|
||||
assert_equal "66.249.64.123 goose", output.strip
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue