Ensure that assert_output_contains receives an argument

This commit is contained in:
Mislav Marohnić 2014-11-17 15:07:40 -08:00
parent 7f1869cbcd
commit ff2b5dc90e

View file

@ -115,6 +115,10 @@ assert_output() {
assert_output_contains() {
local expected="$1"
if [ -z "$expected" ]; then
echo "assert_output_contains needs an argument" >&2
return 1
fi
echo "$output" | $(type -p ggrep grep | head -1) -F "$expected" >/dev/null || {
{ echo "expected output to contain $expected"
echo "actual: $output"