diff options
author | Michele Orrù <maker@tumbolandia.net> | 2014-07-07 20:48:16 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-07-07 22:41:07 +0200 |
commit | 3c528b911af131028486d4873d5dcbd0682ed15e (patch) | |
tree | ca3f3fcfc02ecaad65a970869dd8711607c52b9e /test/integration/run-tests | |
parent | eb191ca3584816533e82cd6b8cd1f133ae28149a (diff) |
use printf instead of echo in testing framework
The behaviour of echo "\tA\t" differs between dash/zsh which interprets
the \t as tab and bash which prints it literally. Similar things happen
for other escape sequences – without the -e flag.
Switching to printf makes this more painless^Wportable, so that the
tests are also working correctly with bash as sh.
(commit message by committer, patch otherwise unmodified)
Diffstat (limited to 'test/integration/run-tests')
-rwxr-xr-x | test/integration/run-tests | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/run-tests b/test/integration/run-tests index d39daeee5..9dd550aa2 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -39,9 +39,9 @@ fi TOTAL="$(run-parts --list $DIR | grep '/test-' | wc -l)" for testcase in $(run-parts --list $DIR | grep '/test-'); do if [ "$MSGLEVEL" -le 2 ]; then - echo -n "($(($ALL+1))/${TOTAL}) ${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: " + printf "($(($ALL+1))/${TOTAL}) ${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: " else - echo "${CTEST}Run Testcase ($(($ALL+1))/${TOTAL}) ${CHIGH}$(basename ${testcase})${CRESET}" + printf "${CTEST}Run Testcase ($(($ALL+1))/${TOTAL}) ${CHIGH}$(basename ${testcase})${CRESET}\n" fi if ! ${testcase}; then FAIL=$((FAIL+1)) |