Change internal protocol from clicon_proto.h to netconf.
This commit is contained in:
parent
2e09f54d12
commit
2fcefda831
66 changed files with 3012 additions and 5141 deletions
24
test/lib.sh
24
test/lib.sh
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
testnr=0
|
||||
testnname=
|
||||
|
|
@ -32,7 +32,7 @@ expectfn(){
|
|||
fi
|
||||
# grep extended grep
|
||||
match=`echo "$ret" | grep -Eo "$expect"`
|
||||
# echo "ret:$ret"
|
||||
# echo "ret:<$ret>"
|
||||
# echo "expect:$expect"
|
||||
# echo "match:$match"
|
||||
if [ -z "$match" ]; then
|
||||
|
|
@ -57,7 +57,25 @@ EOF
|
|||
fi
|
||||
match=`echo "$ret" | grep -Eo "$expect"`
|
||||
if [ -z "$match" ]; then
|
||||
err "\nExpected:\t\"$expect\"\nGot:\t\"$ret\""
|
||||
err "
|
||||
fi
|
||||
}
|
||||
|
||||
# clicon_cli tester. First arg is command and second is expected outcome
|
||||
expectwait(){
|
||||
cmd=$1
|
||||
input=$2
|
||||
expect=$3
|
||||
wait=$4
|
||||
|
||||
# Do while read stuff
|
||||
sleep 10|cat <(echo $input) -| $cmd | while [ 1 ] ; do
|
||||
read ret
|
||||
match=$(echo "$ret" | grep -Eo "$expect");
|
||||
if [ -z "$match" ]; then
|
||||
err "\nExpected:\t\"$expect\"\nGot:\t\"$ret\""
|
||||
fi
|
||||
break
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue