From bbe898582e648c1eecf8c7b894af920c15c98379 Mon Sep 17 00:00:00 2001 From: dtucker Date: Wed, 29 Apr 2015 05:23:27 +0000 Subject: [PATCH] Add tests for ListenAddress/Port/AddressFamily in alternate orders. --- regress/usr.bin/ssh/cfgparse.sh | 39 +++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/regress/usr.bin/ssh/cfgparse.sh b/regress/usr.bin/ssh/cfgparse.sh index d86cb394cf1..35e1312bd1d 100644 --- a/regress/usr.bin/ssh/cfgparse.sh +++ b/regress/usr.bin/ssh/cfgparse.sh @@ -1,4 +1,4 @@ -# $OpenBSD: cfgparse.sh,v 1.1 2015/04/23 05:01:19 dtucker Exp $ +# $OpenBSD: cfgparse.sh,v 1.2 2015/04/29 05:23:27 dtucker Exp $ # Placed in the Public Domain. tid="config parse" @@ -13,4 +13,39 @@ verbose "reparse regress config" $SUDO ${SSHD} -T -f $OBJ/sshd_config.1 >$OBJ/sshd_config.2 && diff $OBJ/sshd_config.1 $OBJ/sshd_config.2) || fail "reparse regress config" -rm -f $OBJ/sshd_config.[12] +verbose "listenaddress order" +# expected output +cat > $OBJ/sshd_config.0 < $OBJ/sshd_config.1 <$OBJ/sshd_config.2 && + diff -u $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \ + fail "listenaddress order 1" +# test 2: listenaddress first +cat > $OBJ/sshd_config.1 <$OBJ/sshd_config.2 && + diff -u $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \ + fail "listenaddress order 2" + +# cleanup +rm -f $OBJ/sshd_config.[012] -- 2.20.1