From 68d293859ed2db128003d6631b63847acf0ea79f Mon Sep 17 00:00:00 2001 From: Tim Rice Date: Fri, 7 Mar 2008 19:00:33 -0800 Subject: [PATCH] - (tim) [regress/sftp-glob.sh] Shell portability fix. --- ChangeLog | 3 ++- regress/sftp-glob.sh | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index de61e1755..4bd3b4603 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,6 +37,7 @@ - deraadt@cvs.openbsd.org 2008/03/04 21:15:42 [version.h] crank version; from djm + - (tim) [regress/sftp-glob.sh] Shell portability fix. 20080302 - (dtucker) [configure.ac] FreeBSD's glob() doesn't behave the way we expect @@ -3697,4 +3698,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4859 2008/03/07 07:35:47 djm Exp $ +$Id: ChangeLog,v 1.4860 2008/03/08 03:00:33 tim Exp $ diff --git a/regress/sftp-glob.sh b/regress/sftp-glob.sh index 62004efc5..60116a748 100644 --- a/regress/sftp-glob.sh +++ b/regress/sftp-glob.sh @@ -15,9 +15,12 @@ sftp_ls() { if [ $? -ne 0 ]; then fail "$errtag failed" fi - if test "x$expected" != "x" && \ - ! fgrep "$expected" ${RESULTS} >/dev/null 2>&1 ; then + if test "x$expected" != "x" ; then + if fgrep "$expected" ${RESULTS} >/dev/null 2>&1 ; then + : + else fail "$expected missing from $errtag results" + fi fi if test "x$unexpected" != "x" && \ fgrep "$unexpected" ${RESULTS} >/dev/null 2>&1 ; then