croc: fix test

Update croc.rb

update test for linux build

Closes #85076.

Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Rui Chen 2021-09-11 18:15:04 -04:00 committed by BrewTestBot
parent 1ce3271cff
commit 3bdd07849f
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 3 additions and 2 deletions

View File

@ -24,8 +24,9 @@ class Croc < Formula
fork do
exec bin/"croc", "send", "--code=homebrew-test", "--text=mytext"
end
sleep 1
sleep 5
assert_match shell_output("#{bin}/croc --yes homebrew-test").chomp, "mytext"
assert_match "mytext", pipe_output(bin/"croc --yes homebrew-test", "y\n") if OS.mac?
assert_match shell_output("#{bin}/croc --yes homebrew-test").chomp, "mytext" if OS.linux?
end
end