Commit ff2b5dc9 authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

Ensure that `assert_output_contains` receives an argument

parent 7f1869cb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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"