File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed
Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ assert_failure() {
6363 if (( status == 0 )) ; then
6464 { local -ir width=6
6565 batslib_print_kv_single_or_multi " $width " ' output' " $output "
66- if [[ -n " $stderr " ]]; then
66+ if [[ -n " ${ stderr-} " ]]; then
6767 batslib_print_kv_single_or_multi " $width " ' stderr' " $stderr "
6868 fi
6969 } \
@@ -76,7 +76,7 @@ assert_failure() {
7676 ' actual' " $status "
7777 batslib_print_kv_single_or_multi " $width " \
7878 ' output' " $output "
79- if [[ -n " $stderr " ]]; then
79+ if [[ -n " ${ stderr-} " ]]; then
8080 batslib_print_kv_single_or_multi " $width " ' stderr' " $stderr "
8181 fi
8282 } \
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ assert_success() {
3737 { local -ir width=6
3838 batslib_print_kv_single " $width " ' status' " $status "
3939 batslib_print_kv_single_or_multi " $width " ' output' " $output "
40- if [[ -n " $stderr " ]]; then
40+ if [[ -n " ${ stderr-} " ]]; then
4141 batslib_print_kv_single_or_multi " $width " ' stderr' " $stderr "
4242 fi
4343 } \
Original file line number Diff line number Diff line change @@ -27,10 +27,9 @@ ERR_MSG
2727 bash -c ' echo "a"
2828 echo "b" >&2
2929 exit 0'
30+ echo " Stderr: $stderr " >&3
3031 run assert_failure
3132
32- echo " Stderr: $stderr " >&3
33-
3433 assert_test_fail << 'ERR_MSG '
3534
3635-- command succeeded, but it was expected to fail --
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ ERR_MSG
236236}
237237
238238@test " refute_stderr(): \` --' stops parsing options" {
239- run echo_err ' --'
239+ run --separate-stderr echo_err ' --'
240240 run refute_stderr -- ' -p'
241241 assert_test_pass
242242}
You can’t perform that action at this time.
0 commit comments