t0001-init.sh: use the $( ... ) construct for command substitution
[gitweb.git] / t / test-lib.sh
index 569b52dc0fa32f48f37dc0d29771118cc624c5e7..87f327ff8bcd2c2a29fcbabe74c226232b54f728 100644 (file)
@@ -283,7 +283,7 @@ error "Test script did not set test_description."
 
 if test "$help" = "t"
 then
-       echo "$test_description"
+       printf '%s\n' "$test_description"
        exit 0
 fi
 
@@ -334,7 +334,7 @@ test_failure_ () {
        test_failure=$(($test_failure + 1))
        say_color error "not ok $test_count - $1"
        shift
-       echo "$@" | sed -e 's/^/#       /'
+       printf '%s\n' "$*" | sed -e 's/^/#      /'
        test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; }
 }