miaou-bash.test.bash

This commit is contained in:
pvincent
2026-08-21 13:31:41 +04:00
parent f20d497115
commit e64fbd10c3
+3 -2
View File
@@ -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
}