diff options
author | Damien Miller <djm@mindrot.org> | 2011-01-07 09:54:20 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2011-01-07 09:54:20 +1100 |
commit | 7d06b00032d2d57474dbba9fddd0b8cd9ef05ef3 (patch) | |
tree | e4ee719585a112206d419f490ff358d1533a757d /regress/host-expand.sh | |
parent | 64abf31425e2e72b9d308b51519bd123ae77830f (diff) |
- djm@cvs.openbsd.org 2011/01/06 22:46:21
[regress/Makefile regress/host-expand.sh]
regress test for LocalCommand %n expansion from bert.wesarg AT
googlemail.com; ok markus@
Diffstat (limited to 'regress/host-expand.sh')
-rw-r--r-- | regress/host-expand.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/regress/host-expand.sh b/regress/host-expand.sh new file mode 100644 index 000000000..c0417d9c9 --- /dev/null +++ b/regress/host-expand.sh | |||
@@ -0,0 +1,18 @@ | |||
1 | # Placed in the Public Domain. | ||
2 | |||
3 | tid="expand %h and %n" | ||
4 | |||
5 | echo 'PermitLocalCommand yes' >> $OBJ/ssh_proxy | ||
6 | printf 'LocalCommand printf "%%%%s\\n" "%%n" "%%h"\n' >> $OBJ/ssh_proxy | ||
7 | |||
8 | cat >expect <<EOE | ||
9 | somehost | ||
10 | 127.0.0.1 | ||
11 | EOE | ||
12 | |||
13 | for p in 1 2; do | ||
14 | verbose "test $tid: proto $p" | ||
15 | ${SSH} -F $OBJ/ssh_proxy -$p somehost true >actual | ||
16 | diff expect actual || fail "$tid proto $p" | ||
17 | done | ||
18 | |||