diff --git a/test/miaou-bash.test.bash b/test/miaou-bash.test.bash index 7fcc184..47794bc 100755 --- a/test/miaou-bash.test.bash +++ b/test/miaou-bash.test.bash @@ -91,13 +91,14 @@ function fail_stderr_grep { ((test_count++)) cmd="$MIAOU_BASH_DIR/test/stub/scenario.bash $1" stderr_line="$2" - if ! $cmd 2>"$TMP_ERR" 3>/dev/null && grep -q "$stderr_line" "$TMP_ERR"; then + + if ! $cmd 2>"$TMP_ERR" && grep -q "$stderr_line" "$TMP_ERR"; then echo -n . return fi echo -n F - failures+=("$cmd 2>&1 3>/dev/null | grep \"$stderr_line\"") + failures+=("$cmd 2>&1 | grep -q \"$stderr_line\"") return 1 }