diff options
Diffstat (limited to 'regress/percent.sh')
-rw-r--r-- | regress/percent.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/regress/percent.sh b/regress/percent.sh index 2e891f693..cdcbe1839 100644 --- a/regress/percent.sh +++ b/regress/percent.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: percent.sh,v 1.6 2020/04/10 00:54:03 dtucker Exp $ | 1 | # $OpenBSD: percent.sh,v 1.7 2020/05/29 04:32:26 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="percent expansions" | 4 | tid="percent expansions" |
@@ -56,7 +56,7 @@ trial() | |||
56 | 56 | ||
57 | for i in matchexec localcommand remotecommand controlpath identityagent \ | 57 | for i in matchexec localcommand remotecommand controlpath identityagent \ |
58 | forwardagent localforward remoteforward; do | 58 | forwardagent localforward remoteforward; do |
59 | verbose $tid $i | 59 | verbose $tid $i percent |
60 | if [ "$i" = "localcommand" ]; then | 60 | if [ "$i" = "localcommand" ]; then |
61 | REMUSER=$USER | 61 | REMUSER=$USER |
62 | trial $i '%T' NONE | 62 | trial $i '%T' NONE |
@@ -81,8 +81,19 @@ for i in matchexec localcommand remotecommand controlpath identityagent \ | |||
81 | "%/$HASH/$USERID/127.0.0.1/$HOME/$HOST/$HOSTNAME/somehost/$PORT/$REMUSER/$USER" | 81 | "%/$HASH/$USERID/127.0.0.1/$HOME/$HOST/$HOSTNAME/somehost/$PORT/$REMUSER/$USER" |
82 | done | 82 | done |
83 | 83 | ||
84 | # Subset of above since we don't expand shell-style variables on anything that | ||
85 | # runs a command because the shell will expand those. | ||
86 | for i in controlpath identityagent forwardagent localforward remoteforward; do | ||
87 | verbose $tid $i dollar | ||
88 | FOO=bar | ||
89 | export FOO | ||
90 | trial $i '${FOO}' $FOO | ||
91 | done | ||
92 | |||
93 | |||
84 | # A subset of options support tilde expansion | 94 | # A subset of options support tilde expansion |
85 | for i in controlpath identityagent forwardagent; do | 95 | for i in controlpath identityagent forwardagent; do |
96 | verbose $tid $i tilde | ||
86 | trial $i '~' $HOME/ | 97 | trial $i '~' $HOME/ |
87 | trial $i '~/.ssh' $HOME/.ssh | 98 | trial $i '~/.ssh' $HOME/.ssh |
88 | done | 99 | done |