From 3c528b911af131028486d4873d5dcbd0682ed15e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michele=20Orr=C3=B9?= Date: Mon, 7 Jul 2014 20:48:16 +0200 Subject: use printf instead of echo in testing framework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- test/integration/run-tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/integration/run-tests') 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)) -- cgit v1.2.3