no more stderr
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user