summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/regress/host-expand.sh
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/regress/host-expand.sh')
-rwxr-xr-xcrypto/openssh/regress/host-expand.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/crypto/openssh/regress/host-expand.sh b/crypto/openssh/regress/host-expand.sh
new file mode 100755
index 0000000..a018836
--- /dev/null
+++ b/crypto/openssh/regress/host-expand.sh
@@ -0,0 +1,18 @@
+# Placed in the Public Domain.
+
+tid="expand %h and %n"
+
+echo 'PermitLocalCommand yes' >> $OBJ/ssh_proxy
+printf 'LocalCommand printf "%%%%s\\n" "%%n" "%%h"\n' >> $OBJ/ssh_proxy
+
+cat >$OBJ/expect <<EOE
+somehost
+127.0.0.1
+EOE
+
+for p in 1 2; do
+ verbose "test $tid: proto $p"
+ ${SSH} -F $OBJ/ssh_proxy -$p somehost true >$OBJ/actual
+ diff $OBJ/expect $OBJ/actual || fail "$tid proto $p"
+done
+
OpenPOWER on IntegriCloud