no more stderr

This commit is contained in:
pvincent
2026-08-16 10:02:24 +04:00
parent e00855e296
commit 3abbfd976a
9 changed files with 43 additions and 21 deletions
+13 -1
View File
@@ -10,6 +10,17 @@ readonly TMP_DIRECTORY TMP_OUT TMP_ERR TMP_MIAOU
# functions
function assert_stderr {
((test_count++))
if [[ -w /dev/stderr ]]; then
echo -n .
return
fi
echo -n F
failures+=("test -w /dev/stderr")
return 1
}
function assert {
((test_count++))
cmd="$MIAOU_BASH_DIR/test/stub/scenario.bash $1"
@@ -113,7 +124,6 @@ function fail_miaou_count {
local regex count="$2"
cmd="$MIAOU_BASH_DIR/test/stub/scenario.bash $1"
# mapfile -t stderr <<<"$(miaou-bash ./test/stub/scenario.bash "$1" 2>&1 >/dev/null 3>/dev/null)"
if ! $cmd >/dev/null 2>/dev/null 3>"$TMP_MIAOU"; then
mapfile -t miaou <"$TMP_MIAOU"
if [[ "${#miaou[@]}" == "$count" ]]; then
@@ -138,6 +148,8 @@ mkdir -p "$TMP_DIRECTORY"
TIMEFORMAT=$'\nelapsed: %Rs'
time {
assert_stderr
assert success
assert exit_0
assert return_conditional
-1
View File
@@ -53,7 +53,6 @@ function show_error {
>&2 printf '\r'
>&2 ansi_block_error "$failure_type" "$failure_payload" "$code"
>&2 ansi_traces stack_sources stack_lines stack_functions
# [[ -p /dev/stdout ]] && kill -TERM $$
}
function echo_return {