summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/percent.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/regress/percent.sh b/regress/percent.sh
index 84999fd0f..7e19abe8f 100644
--- a/regress/percent.sh
+++ b/regress/percent.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: percent.sh,v 1.1 2020/04/03 02:33:31 dtucker Exp $ 1# $OpenBSD: percent.sh,v 1.2 2020/04/03 03:14:03 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="percent expansions" 4tid="percent expansions"
@@ -19,14 +19,24 @@ trial()
19 opt="$1"; arg="$2"; expect="$3" 19 opt="$1"; arg="$2"; expect="$3"
20 20
21 trace "test $opt=$arg $expect" 21 trace "test $opt=$arg $expect"
22 if [ "$opt" = "localcommand" ]; then 22 rm -f $OBJ/actual
23 case "$opt" in
24 localcommand)
23 ${SSH} -F $OBJ/ssh_proxy -o $opt="echo '$arg' >$OBJ/actual" \ 25 ${SSH} -F $OBJ/ssh_proxy -o $opt="echo '$arg' >$OBJ/actual" \
24 somehost true 26 somehost true
25 got=`cat $OBJ/actual` 27 got=`cat $OBJ/actual`
26 else 28 ;;
29 matchexec)
30 (cat $OBJ/ssh_proxy && \
31 echo "Match Exec \"echo '$arg' >$OBJ/actual\"") \
32 >$OBJ/ssh_proxy_match
33 ${SSH} -F $OBJ/ssh_proxy_match remuser@somehost true || true
34 got=`cat $OBJ/actual`
35 ;;
36 *)
27 got=`${SSH} -F $OBJ/ssh_proxy -o $opt="$arg" -G \ 37 got=`${SSH} -F $OBJ/ssh_proxy -o $opt="$arg" -G \
28 remuser@somehost | awk '$1=="'$opt'"{print $2}'` 38 remuser@somehost | awk '$1=="'$opt'"{print $2}'`
29 fi 39 esac
30 if [ "$got" != "$expect" ]; then 40 if [ "$got" != "$expect" ]; then
31 fail "$opt=$arg expect $expect got $got" 41 fail "$opt=$arg expect $expect got $got"
32 else 42 else
@@ -34,7 +44,8 @@ trial()
34 fi 44 fi
35} 45}
36 46
37for i in localcommand remotecommand controlpath identityagent forwardagent; do 47for i in matchexec localcommand remotecommand controlpath identityagent \
48 forwardagent; do
38 if [ "$i" = "localcommand" ]; then 49 if [ "$i" = "localcommand" ]; then
39 HASH=94237ca18fe6b187dccf57e5593c0bb0a29cc302 50 HASH=94237ca18fe6b187dccf57e5593c0bb0a29cc302
40 REMUSER=$USER 51 REMUSER=$USER