The idea is that $test_count could be used in tests to label
intermediate files. The output enabled by this patch (and --debug)
helps figure out which OUTPUT.nn file belongs to which test in case
several subtests write to OUTPUT.$test_count
esac
done
+if test -n "$debug"; then
+ print_subtest () {
+ printf " %-4s" "[$((test_count - 1))]"
+ }
+else
+ print_subtest () {
+ true
+ }
+fi
+
if test -n "$color"; then
say_color () {
(
printf " "
printf "$@"
tput sgr0
+ print_subtest
)
}
else
shift
printf " "
printf "$@"
+ print_subtest
}
fi