2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

don't swallow backslash characters in test output

This commit is contained in:
Mark Andrews
2020-02-04 11:52:06 +11:00
committed by Evan Hunt
parent 8745043a86
commit fc4e44bd37

View File

@@ -95,6 +95,8 @@ else
COLOR_WARN='' COLOR_WARN=''
fi fi
SYSTESTDIR="`basename $PWD`"
if type printf > /dev/null 2>&1 if type printf > /dev/null 2>&1
then then
echofail () { echofail () {
@@ -115,6 +117,23 @@ then
echoend () { echoend () {
printf "${COLOR_END}%s${COLOR_NONE}\n" "$*" 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 else
echofail () { echofail () {
echo "$*" echo "$*"
@@ -134,36 +153,34 @@ else
echoend () { echoend () {
echo "$*" echo "$*"
} }
fi
SYSTESTDIR="`basename $PWD`"
echo_i() { echo_i() {
echo "$@" | while read __LINE ; do echo "$@" | while read -r __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE" echoinfo "I:$SYSTESTDIR:$__LINE"
done done
} }
echo_ic() { echo_ic() {
echo "$@" | while read __LINE ; do echo "$@" | while read -r __LINE ; do
echoinfo "I:$SYSTESTDIR: $__LINE"
done
}
cat_i() {
while read __LINE ; do
echoinfo "I:$SYSTESTDIR: $__LINE" echoinfo "I:$SYSTESTDIR: $__LINE"
done done
} }
echo_d() { echo_d() {
echo "$@" | while read __LINE ; do echo "$@" | while read -r __LINE ; do
echoinfo "D:$SYSTESTDIR:$__LINE" echoinfo "D:$SYSTESTDIR:$__LINE"
done done
} }
fi
cat_i() {
while read -r __LINE ; do
echoinfo "I:$SYSTESTDIR:$__LINE"
done
}
cat_d() { cat_d() {
while read __LINE ; do while read -r __LINE ; do
echoinfo "D:$SYSTESTDIR:$__LINE" echoinfo "D:$SYSTESTDIR:$__LINE"
done done
} }