Browse Source

miaou-bash.test.bash

main
pvincent 2 weeks ago
parent
commit
e64fbd10c3
  1. 5
      test/miaou-bash.test.bash

5
test/miaou-bash.test.bash

@ -91,13 +91,14 @@ function fail_stderr_grep {
((test_count++)) ((test_count++))
cmd="$MIAOU_BASH_DIR/test/stub/scenario.bash $1" cmd="$MIAOU_BASH_DIR/test/stub/scenario.bash $1"
stderr_line="$2" 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 . echo -n .
return return
fi fi
echo -n F echo -n F
failures+=("$cmd 2>&1 3>/dev/null | grep \"$stderr_line\"")
failures+=("$cmd 2>&1 | grep -q \"$stderr_line\"")
return 1 return 1
} }

Loading…
Cancel
Save