host-expand.sh revision 264377
111633Sjoerg#	$OpenBSD: host-expand.sh,v 1.3 2014/02/27 23:17:41 djm Exp $
211633Sjoerg#	Placed in the Public Domain.
311633Sjoerg
411633Sjoergtid="expand %h and %n"
511633Sjoerg
650477Speterecho 'PermitLocalCommand yes' >> $OBJ/ssh_proxy
711633Sjoergprintf 'LocalCommand printf "%%%%s\\n" "%%n" "%%h"\n' >> $OBJ/ssh_proxy
874858Ssobomax
911633Sjoergcat >$OBJ/expect <<EOE
1011633Sjoergsomehost
1111633Sjoerg127.0.0.1
1211633SjoergEOE
1311633Sjoerg
1411633Sjoergfor p in 1 2; do
1511633Sjoerg	verbose "test $tid: proto $p"
1611633Sjoerg	${SSH} -F $OBJ/ssh_proxy -$p somehost true >$OBJ/actual
1711633Sjoerg	diff $OBJ/expect $OBJ/actual || fail "$tid proto $p"
1811633Sjoergdone
1911633Sjoerg
2011633Sjoerg