upstream: Add tests for TOKEN expansion of LocalForward and

RemoteForward.

OpenBSD-Regress-ID: 90fcbc60d510eb114a2b6eaf4a06ff87ecd80a89
This commit is contained in:
dtucker@openbsd.org 2020-04-10 00:54:03 +00:00 committed by Darren Tucker
parent abc3e0a517
commit b6a4013647
1 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: percent.sh,v 1.5 2020/04/04 22:14:26 dtucker Exp $ # $OpenBSD: percent.sh,v 1.6 2020/04/10 00:54:03 dtucker Exp $
# Placed in the Public Domain. # Placed in the Public Domain.
tid="percent expansions" tid="percent expansions"
@ -38,6 +38,13 @@ trial()
${SSH} -F $OBJ/ssh_proxy_match remuser@somehost true || true ${SSH} -F $OBJ/ssh_proxy_match remuser@somehost true || true
got=`cat $OBJ/actual` got=`cat $OBJ/actual`
;; ;;
*forward)
# LocalForward and RemoteForward take two args and only
# operate on Unix domain socket paths
got=`${SSH} -F $OBJ/ssh_proxy -o $opt="/$arg /$arg" -G \
remuser@somehost | awk '$1=="'$opt'"{print $2" "$3}'`
expect="/$expect /$expect"
;;
*) *)
got=`${SSH} -F $OBJ/ssh_proxy -o $opt="$arg" -G \ got=`${SSH} -F $OBJ/ssh_proxy -o $opt="$arg" -G \
remuser@somehost | awk '$1=="'$opt'"{print $2}'` remuser@somehost | awk '$1=="'$opt'"{print $2}'`
@ -48,7 +55,7 @@ trial()
} }
for i in matchexec localcommand remotecommand controlpath identityagent \ for i in matchexec localcommand remotecommand controlpath identityagent \
forwardagent; do forwardagent localforward remoteforward; do
verbose $tid $i verbose $tid $i
if [ "$i" = "localcommand" ]; then if [ "$i" = "localcommand" ]; then
REMUSER=$USER REMUSER=$USER