From 3b58d010a307e4e2a86b709c0ba4a3439bb2eaf8 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Mon, 19 Sep 2022 14:39:06 +0200 Subject: [PATCH] Test: expecteof_netconf use fix string grep, fix err funciton call-by-value --- test/lib.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/lib.sh b/test/lib.sh index f1eb78e2..73d4354a 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -420,6 +420,8 @@ fi # Assumes: $dir and $expect are set # see err1 function err(){ + expect=$1 + ret=$2 echo -e "\e[31m\nError in Test$testnr [$testname]:" if [ $# -gt 0 ]; then echo "Expected: $1" @@ -891,7 +893,10 @@ EOF else while read i do - r=$(echo "$ret" | grep --null -Go "$i") + # -F fixed strings + # -G basic regexp + # r=$(echo "$ret" | grep --null -Go "$i") + r=$(echo "$ret" | grep --null -Fo "$i") match=$? if [ $match -ne 0 ]; then err "$expectenc" "$ret"