aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test-lib.sh
diff options
context:
space:
mode:
authorGravatar Tomi Ollila <tomi.ollila@iki.fi>2013-11-25 19:08:18 +0200
committerGravatar David Bremner <david@tethera.net>2013-12-09 23:25:41 +0800
commitf05e7f3ce50b5762a56406b29012b25e2d1329b2 (patch)
tree2ee9ff566e63e508a4d0a67748b69fe3090e6ae7 /test/test-lib.sh
parent5985438e057b51404208458fceadd03aae13eb80 (diff)
test: print empty line at the beginning of test script, not at end
In preparation for quiet mode print empty line before writing the test description. This is done now in function designed for it -- it will also be called when test fails.
Diffstat (limited to 'test/test-lib.sh')
-rw-r--r--test/test-lib.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 6e475452..34e0db68 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -190,7 +190,15 @@ then
exit 0
fi
-echo $this_test: "Testing ${test_description}"
+test_description_printed=
+print_test_description ()
+{
+ test -z "$test_description_printed" || return 0
+ echo
+ echo $this_test: "Testing ${test_description}"
+ test_description_printed=1
+}
+print_test_description
exec 5>&1
@@ -979,8 +987,6 @@ test_done () {
echo "failed $test_failure" >> $test_results_path
echo "" >> $test_results_path
- echo
-
[ -n "$EMACS_SERVER" ] && test_emacs '(kill-emacs)'
if [ "$test_failure" = "0" ]; then