Skip to content

Commit 148bce9

Browse files
committed
Merge branch 'jk/test-helper-v-output-fix'
Test framework update. * jk/test-helper-v-output-fix: t: send verbose test-helper output to fd 4
2 parents e33c332 + 03aa378 commit 148bce9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

t/test-lib-functions.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -633,22 +633,22 @@ test_must_fail () {
633633
exit_code=$?
634634
if test $exit_code -eq 0 && ! list_contains "$_test_ok" success
635635
then
636-
echo >&2 "test_must_fail: command succeeded: $*"
636+
echo >&4 "test_must_fail: command succeeded: $*"
637637
return 1
638638
elif test_match_signal 13 $exit_code && list_contains "$_test_ok" sigpipe
639639
then
640640
return 0
641641
elif test $exit_code -gt 129 && test $exit_code -le 192
642642
then
643-
echo >&2 "test_must_fail: died by signal $(($exit_code - 128)): $*"
643+
echo >&4 "test_must_fail: died by signal $(($exit_code - 128)): $*"
644644
return 1
645645
elif test $exit_code -eq 127
646646
then
647-
echo >&2 "test_must_fail: command not found: $*"
647+
echo >&4 "test_must_fail: command not found: $*"
648648
return 1
649649
elif test $exit_code -eq 126
650650
then
651-
echo >&2 "test_must_fail: valgrind error: $*"
651+
echo >&4 "test_must_fail: valgrind error: $*"
652652
return 1
653653
fi
654654
return 0
@@ -688,7 +688,7 @@ test_expect_code () {
688688
return 0
689689
fi
690690

691-
echo >&2 "test_expect_code: command exited with $exit_code, we wanted $want_code $*"
691+
echo >&4 "test_expect_code: command exited with $exit_code, we wanted $want_code $*"
692692
return 1
693693
}
694694

@@ -752,18 +752,18 @@ test_i18ngrep () {
752752
shift
753753
! grep "$@" && return 0
754754

755-
echo >&2 "error: '! grep $@' did find a match in:"
755+
echo >&4 "error: '! grep $@' did find a match in:"
756756
else
757757
grep "$@" && return 0
758758

759-
echo >&2 "error: 'grep $@' didn't find a match in:"
759+
echo >&4 "error: 'grep $@' didn't find a match in:"
760760
fi
761761

762762
if test -s "$last_arg"
763763
then
764-
cat >&2 "$last_arg"
764+
cat >&4 "$last_arg"
765765
else
766-
echo >&2 "<File '$last_arg' is empty>"
766+
echo >&4 "<File '$last_arg' is empty>"
767767
fi
768768

769769
return 1
@@ -774,7 +774,7 @@ test_i18ngrep () {
774774
# not output anything when they fail.
775775
verbose () {
776776
"$@" && return 0
777-
echo >&2 "command failed: $(git rev-parse --sq-quote "$@")"
777+
echo >&4 "command failed: $(git rev-parse --sq-quote "$@")"
778778
return 1
779779
}
780780

0 commit comments

Comments
 (0)