1295367Sdes#	$OpenBSD: host-expand.sh,v 1.4 2015/03/03 22:35:19 markus Exp $
2218767Sdes#	Placed in the Public Domain.
3218767Sdes
4218767Sdestid="expand %h and %n"
5218767Sdes
6218767Sdesecho 'PermitLocalCommand yes' >> $OBJ/ssh_proxy
7218767Sdesprintf 'LocalCommand printf "%%%%s\\n" "%%n" "%%h"\n' >> $OBJ/ssh_proxy
8218767Sdes
9218767Sdescat >$OBJ/expect <<EOE
10218767Sdessomehost
11218767Sdes127.0.0.1
12218767SdesEOE
13218767Sdes
14295367Sdesfor p in ${SSH_PROTOCOLS}; do
15218767Sdes	verbose "test $tid: proto $p"
16218767Sdes	${SSH} -F $OBJ/ssh_proxy -$p somehost true >$OBJ/actual
17218767Sdes	diff $OBJ/expect $OBJ/actual || fail "$tid proto $p"
18218767Sdesdone
19218767Sdes
20