aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
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
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')
-rwxr-xr-xtest/notmuch-test1
-rw-r--r--test/test-lib.sh12
-rw-r--r--test/test.expected-output/test-verbose-no1
-rw-r--r--test/test.expected-output/test-verbose-yes1
4 files changed, 12 insertions, 3 deletions
diff --git a/test/notmuch-test b/test/notmuch-test
index 18593f61..d6fdd3a5 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -98,6 +98,7 @@ done
trap - HUP INT TERM
# Report results
+echo
./aggregate-results.sh test-results/*
ev=$?
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
diff --git a/test/test.expected-output/test-verbose-no b/test/test.expected-output/test-verbose-no
index 0bca7540..1a2ff619 100644
--- a/test/test.expected-output/test-verbose-no
+++ b/test/test.expected-output/test-verbose-no
@@ -1,3 +1,4 @@
+
test-verbose: Testing the verbosity options of the test framework itself.
PASS print something in test_expect_success and pass
FAIL print something in test_expect_success and fail
diff --git a/test/test.expected-output/test-verbose-yes b/test/test.expected-output/test-verbose-yes
index ebe51874..d25466e9 100644
--- a/test/test.expected-output/test-verbose-yes
+++ b/test/test.expected-output/test-verbose-yes
@@ -1,3 +1,4 @@
+
test-verbose: Testing the verbosity options of the test framework itself.
hello stdout
hello stderr