Test: magic line was not first in script and NULL in command substitution

This commit is contained in:
Olof Hagsand 2023-04-27 12:57:08 +00:00
parent 447b8eb1d3
commit 678d48a699
2 changed files with 4 additions and 4 deletions

View file

@ -368,8 +368,8 @@ function testrun()
expectpart "$(curl $CURLOPTS --http1.0 -X GET $proto://$addr/.well-known/host-meta | tr '\0' '\n')" 0 "" --not-- 'HTTP' expectpart "$(curl $CURLOPTS --http1.0 -X GET $proto://$addr/.well-known/host-meta | tr '\0' '\n')" 0 "" --not-- 'HTTP'
else else
new "restconf GET https/1.0 - close" new "restconf GET https/1.0 - close"
expectpart "$(curl $CURLOPTS --http1.0 -X GET $proto://$addr/.well-known/host-meta)" "52 56" "" --not-- 'HTTP' # expectpart "$(curl $CURLOPTS --http1.0 -X GET $proto://$addr/.well-known/host-meta | tr '\0' '\n')" "52 56" "" --not-- 'HTTP'
expectpart "$(curl $CURLOPTS --http1.0 -X GET $proto://$addr/.well-known/host-meta | tr '\0' '\n')" 0 "" --not-- 'HTTP'
fi fi
if [ $proto = http ]; then if [ $proto = http ]; then
@ -377,7 +377,7 @@ function testrun()
expectpart "$(curl $CURLOPTS --http1.1 -X GET $proto://$addr/.well-known/host-meta | tr '\0' '\n')" 0 --not-- 'HTTP' expectpart "$(curl $CURLOPTS --http1.1 -X GET $proto://$addr/.well-known/host-meta | tr '\0' '\n')" 0 --not-- 'HTTP'
else else
new "restconf GET https/1.1 - close" new "restconf GET https/1.1 - close"
expectpart "$(curl $CURLOPTS --http1.1 -X GET $proto://$addr/.well-known/host-meta)" "52 56" --not-- 'HTTP' expectpart "$(curl $CURLOPTS --http1.1 -X GET $proto://$addr/.well-known/host-meta | tr '\0' '\n')" 0 --not-- 'HTTP'
fi fi
if [ $proto = http ]; then if [ $proto = http ]; then

View file

@ -3,9 +3,9 @@
# Test of CLICON_RESTCONF_NOALPN_DEFAULT AND client certs # Test of CLICON_RESTCONF_NOALPN_DEFAULT AND client certs
# Also client certs (reason is usecase was POSTMAN w client certs) # Also client certs (reason is usecase was POSTMAN w client certs)
dir=/tmp/test_restconf_noalpn.sh
# Magic line must be first in script (see README.md) # Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
dir=/tmp/test_restconf_noalpn.sh
# Only works with native and https # Only works with native and https
if [ "${WITH_RESTCONF}" != "native" ]; then if [ "${WITH_RESTCONF}" != "native" ]; then