Browse Source

assert_tty

main
pvincent 3 weeks ago
parent
commit
8fe418da17
  1. 9
      test/miaou-bash.test.bash

9
test/miaou-bash.test.bash

@ -10,14 +10,14 @@ readonly TMP_DIRECTORY TMP_OUT TMP_ERR TMP_MIAOU
# functions # functions
function assert_stderr {
function assert_tty {
((test_count++)) ((test_count++))
if [[ -w /dev/stderr ]]; then
if [[ -w /dev/tty ]]; then
echo -n . echo -n .
return return
fi fi
echo -n F echo -n F
failures+=("test -w /dev/stderr")
failures+=("test -w /dev/tty")
return 1 return 1
} }
@ -148,8 +148,7 @@ mkdir -p "$TMP_DIRECTORY"
TIMEFORMAT=$'\nelapsed: %Rs' TIMEFORMAT=$'\nelapsed: %Rs'
time { time {
assert_stderr
assert_tty
assert success assert success
assert exit_0 assert exit_0
assert return_conditional assert return_conditional

Loading…
Cancel
Save