]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
run_some: fix shellcheck warning
authorSerge Hallyn <serge@hallyn.com>
Tue, 28 Feb 2023 03:16:38 +0000 (21:16 -0600)
committerSerge Hallyn <serge@hallyn.com>
Tue, 28 Feb 2023 03:38:45 +0000 (21:38 -0600)
shellcheck warns against using echo with flags, as posix sh won't
support it.  It suggests using printf, so let's do that.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
tests/run_some

index 0e7729df6a835776572145443de00bd535977d12..91f5626b19ee61876294eebdbfa20ef6e75f4806 100755 (executable)
@@ -25,14 +25,14 @@ run_test()
        fi
 
        if [ -n "$2" ]; then # ignore failure
-               echo -n "."
+               printf '.'
        elif [ $passed -eq 1 ]; then
                succeeded=$((succeeded+1))
-               echo -n "+"
+               printf '+'
        else
                failed=$((failed+1))
                failed_tests="$failed_tests $1"
-               echo -n "-"
+               printf '-'
        fi
        cat $1.log >> testsuite.log
        [ -f /etc/passwd.lock ] && echo $1 /etc/passwd.lock || true