From: Mark Andrews Date: Tue, 4 Feb 2020 00:52:06 +0000 (+1100) Subject: don't swallow backslash characters in test output X-Git-Tag: v9.16.0~35^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc4e44bd37f00aecd6f5cc4fa258795cb1b4eeb5;p=thirdparty%2Fbind9.git don't swallow backslash characters in test output --- diff --git a/bin/tests/system/conf.sh.common b/bin/tests/system/conf.sh.common index af4fac1e91d..0e559c7f792 100644 --- a/bin/tests/system/conf.sh.common +++ b/bin/tests/system/conf.sh.common @@ -95,6 +95,8 @@ else COLOR_WARN='' fi +SYSTESTDIR="`basename $PWD`" + if type printf > /dev/null 2>&1 then echofail () { @@ -115,6 +117,23 @@ then echoend () { printf "${COLOR_END}%s${COLOR_NONE}\n" "$*" } + echo_i() { + printf '%s\n' "$*" | while read -r __LINE ; do + echoinfo "I:$SYSTESTDIR:$__LINE" + done + } + + echo_ic() { + printf '%s\n' "$*" | while read -r __LINE ; do + echoinfo "I:$SYSTESTDIR: $__LINE" + done + } + + echo_d() { + printf '%s\n' "$*" | while read -r __LINE ; do + echoinfo "D:$SYSTESTDIR:$__LINE" + done + } else echofail () { echo "$*" @@ -134,36 +153,34 @@ else echoend () { echo "$*" } -fi -SYSTESTDIR="`basename $PWD`" + echo_i() { + echo "$@" | while read -r __LINE ; do + echoinfo "I:$SYSTESTDIR:$__LINE" + done + } -echo_i() { - echo "$@" | while read __LINE ; do - echoinfo "I:$SYSTESTDIR:$__LINE" - done -} + echo_ic() { + echo "$@" | while read -r __LINE ; do + echoinfo "I:$SYSTESTDIR: $__LINE" + done + } -echo_ic() { - echo "$@" | while read __LINE ; do - echoinfo "I:$SYSTESTDIR: $__LINE" - done -} + echo_d() { + echo "$@" | while read -r __LINE ; do + echoinfo "D:$SYSTESTDIR:$__LINE" + done + } +fi cat_i() { - while read __LINE ; do + while read -r __LINE ; do echoinfo "I:$SYSTESTDIR:$__LINE" done } -echo_d() { - echo "$@" | while read __LINE ; do - echoinfo "D:$SYSTESTDIR:$__LINE" - done -} - cat_d() { - while read __LINE ; do + while read -r __LINE ; do echoinfo "D:$SYSTESTDIR:$__LINE" done }