mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-13 17:50:56 +01:00
build: Print failed tests to STDERR instead of STDOUT
This commit is contained in:
parent
f20a3ff9b8
commit
43ddb984f5
9
build.sh
9
build.sh
@ -462,10 +462,10 @@ if "$OPT_VERIFY"; then
|
|||||||
while read -r action data1 data2 splat; do
|
while read -r action data1 data2 splat; do
|
||||||
[[ "$action" == "result" ]] || continue
|
[[ "$action" == "result" ]] || continue
|
||||||
|
|
||||||
printc_err "\x1B[G\x1B[K%s" "$data1"
|
printc_msg "\x1B[G\x1B[K%s" "$data1"
|
||||||
case "$data2" in
|
case "$data2" in
|
||||||
fail)
|
fail)
|
||||||
printc_err " failed.\n"
|
printc_err "\x1B[G\x1B[K%s failed.\n" "$data1"
|
||||||
((FAIL++)) || true
|
((FAIL++)) || true
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -479,8 +479,9 @@ if "$OPT_VERIFY"; then
|
|||||||
printc_msg "\x1B[G\x1B[K"
|
printc_msg "\x1B[G\x1B[K"
|
||||||
|
|
||||||
if [[ "$FAIL" -ne 0 ]]; then
|
if [[ "$FAIL" -ne 0 ]]; then
|
||||||
printc_err "%{RED}One or more tests failed.\n"
|
printc_err "%{RED}%s\n" "One or more tests failed."
|
||||||
printc_err "Run ./test.sh for more detailed information.%{CLEAR}\n"
|
printc_msg "\x1B[A\x1B[G\x1B[K%{RED}%s\n" "One or more tests failed."
|
||||||
|
printc_err "%{RED}%s%{CLEAR}\n" "Run ./test.sh for more detailed information."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user