[pacman-dev] [PATCH] Format pacsort and vercmp testsuite output

Allan McRae allan at archlinux.org
Sun Oct 9 23:54:04 EDT 2011


Make the output into a single block and add separators at the end
so that they do not merge into each other.

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 test/util/pacsorttest.sh |    6 ++++--
 test/util/vercmptest.sh  |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/test/util/pacsorttest.sh b/test/util/pacsorttest.sh
index ff82a53..9d52d69 100755
--- a/test/util/pacsorttest.sh
+++ b/test/util/pacsorttest.sh
@@ -40,10 +40,11 @@ runtest() {
 
 if ! type -p "$bin"; then
 	echo "pacsort binary ($bin) could not be located"
+	echo
 	exit 1
 fi
 
-echo "Beginning pacsort tests"
+echo "Running pacsort tests..."
 
 # BEGIN TESTS
 
@@ -93,11 +94,12 @@ runtest "$separator" "$separator_reverse" "really long input, sort key, separato
 
 #END TESTS
 
-echo
 if [[ $failure -eq 0 ]]; then
 	echo "All $total tests successful"
+	echo
 	exit 0
 fi
 
 echo "$failure of $total tests failed"
+echo
 exit 1
diff --git a/test/util/vercmptest.sh b/test/util/vercmptest.sh
index 6b4bcbc..04b841f 100755
--- a/test/util/vercmptest.sh
+++ b/test/util/vercmptest.sh
@@ -64,10 +64,11 @@ runtest() {
 
 if ! type -p "$bin"; then
 	echo "vercmp binary ($bin) could not be located"
+	echo
 	exit 1
 fi
 
-echo "Beginning vercmp tests"
+echo "Running vercmp tests..."
 
 # BEGIN TESTS
 
@@ -145,11 +146,12 @@ runtest 1:1.1    1.1   1
 
 #END TESTS
 
-echo
 if [[ $failure -eq 0 ]]; then
 	echo "All $total tests successful"
+	echo
 	exit 0
 fi
 
 echo "$failure of $total tests failed"
+echo
 exit 1
-- 
1.7.7



More information about the pacman-dev mailing list