change success and failure symbols

This commit is contained in:
Thomas Levine 2016-03-31 19:54:27 +00:00
parent 73035208d3
commit 5b2ab72ee1
2 changed files with 15 additions and 8 deletions

View File

@ -1,11 +1,11 @@
./
> a
sh (1 second)
F sh (1 second)
| This is stdout from a.
./
> b
sh (1 second)
. sh (1 second)
./
> c
(File is not executable.)

19
urchin
View File

@ -346,15 +346,15 @@ report_outcome() {
printf "$(dirname -- "${path}")/\n> $(basename -- "${path}")\n"
fi
}
case "${result}" in
ok)
if "${print_ok}"; then
header
# On success, print a green '✓'
if "${print_in_color}"; then
printf '\033[32m✓ \033[0m'
printf "\033[32m${success_mark} \033[0m"
else
printf '✓ '
printf "${success_mark} "
fi
echo "${the_shell} ("${file_elapsed}" $(plural second $file_elapsed))"
fi
@ -362,11 +362,10 @@ report_outcome() {
not_ok)
if "${print_not_ok}"; then
header
# On not_ok, print a red '✗'
if "${print_in_color}"; then
printf '\033[31m✗ \033[0m'
printf "\033[31m${fail_mark} \033[0m"
else
printf '✗ '
printf "${fail_mark} "
fi
echo "${the_shell} ("${file_elapsed}" $(plural second $file_elapsed))"
fi
@ -571,6 +570,14 @@ main() {
shift
done
if $print_in_color; then
success_mark=✓
fail_mark=✗
else
success_mark=.
fail_mark=F
fi
# -------------------- VALIDATE INPUT -------------------- #
if ! "${cycle_shell}" && test -f "${shell_list}"; then
echo "The -n/--disable-cycling and -s/--shell options clash with each other." >&2