summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-07-20 23:11:42 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-07-20 23:11:42 -0400
commit3a94d05833019023636bc8ac55a686f4fa8cf3d8 (patch)
tree7c0f3038f236049605c7d302872dda1402c5dab2
parent4b02d5dae771a8797868ccaddf1bbb7cf0b67c2b (diff)
downloadbfs-3a94d05833019023636bc8ac55a686f4fa8cf3d8.tar.xz
Revert "tests.sh: Better line overwriting"
This reverts commit 4b02d5dae771a8797868ccaddf1bbb7cf0b67c2b. Overwriting the last line of the test output is worse.
-rwxr-xr-xtests.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests.sh b/tests.sh
index dc619e1..a2b1681 100755
--- a/tests.sh
+++ b/tests.sh
@@ -1193,10 +1193,11 @@ failed=0
for test in ${!run_*}; do
test=${test#run_}
- if [ -t 1 -a $((passed + failed)) -gt 0 ]; then
- printf '\033[A\033[J'
+ if [ -t 1 ]; then
+ printf '\r\033[J%s' "$test"
+ else
+ echo "$test"
fi
- echo "$test"
("$test" "$dir")
status=$?
@@ -1210,7 +1211,7 @@ for test in ${!run_*}; do
done
if [ -t 1 ]; then
- printf '\033[A\033[J'
+ printf '\r\033[J'
fi
if [ $passed -gt 0 ]; then