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() {
63
63
if (( status == 0 )) ; then
64
64
{ local -ir width=6
65
65
batslib_print_kv_single_or_multi " $width " ' output' " $output "
66
- if [[ -n " $stderr " ]]; then
66
+ if [[ -n " ${ stderr-} " ]]; then
67
67
batslib_print_kv_single_or_multi " $width " ' stderr' " $stderr "
68
68
fi
69
69
} \
@@ -76,7 +76,7 @@ assert_failure() {
76
76
' actual' " $status "
77
77
batslib_print_kv_single_or_multi " $width " \
78
78
' output' " $output "
79
- if [[ -n " $stderr " ]]; then
79
+ if [[ -n " ${ stderr-} " ]]; then
80
80
batslib_print_kv_single_or_multi " $width " ' stderr' " $stderr "
81
81
fi
82
82
} \
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ assert_success() {
37
37
{ local -ir width=6
38
38
batslib_print_kv_single " $width " ' status' " $status "
39
39
batslib_print_kv_single_or_multi " $width " ' output' " $output "
40
- if [[ -n " $stderr " ]]; then
40
+ if [[ -n " ${ stderr-} " ]]; then
41
41
batslib_print_kv_single_or_multi " $width " ' stderr' " $stderr "
42
42
fi
43
43
} \
Original file line number Diff line number Diff line change @@ -27,10 +27,9 @@ ERR_MSG
27
27
bash -c ' echo "a"
28
28
echo "b" >&2
29
29
exit 0'
30
+ echo " Stderr: $stderr " >&3
30
31
run assert_failure
31
32
32
- echo " Stderr: $stderr " >&3
33
-
34
33
assert_test_fail << 'ERR_MSG '
35
34
36
35
-- command succeeded, but it was expected to fail --
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ ERR_MSG
236
236
}
237
237
238
238
@test " refute_stderr(): \` --' stops parsing options" {
239
- run echo_err ' --'
239
+ run --separate-stderr echo_err ' --'
240
240
run refute_stderr -- ' -p'
241
241
assert_test_pass
242
242
}
You can’t perform that action at this time.
0 commit comments