diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2024-03-25 07:05:42 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2024-03-26 08:54:38 +0100 |
commit | 16e2ebe06a62f09d4877b769876d92d6008a896f (patch) | |
tree | 867fb291c711b8c6260094f77809a5a9166f47a3 /regress/sftp-cmds.sh | |
parent | upstream: Improve shell portability: grep -q is not portable so (diff) | |
download | openssh-16e2ebe06a62f09d4877b769876d92d6008a896f.tar.xz openssh-16e2ebe06a62f09d4877b769876d92d6008a896f.zip |
upstream: Verify string returned from local shell command.
OpenBSD-Regress-ID: 5039bde24d33d809aebfa8d3ad7fe9053224e6f8
Diffstat (limited to '')
-rw-r--r-- | regress/sftp-cmds.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh index f0ba59076..3bbd079d4 100644 --- a/regress/sftp-cmds.sh +++ b/regress/sftp-cmds.sh @@ -1,4 +1,4 @@ -# $OpenBSD: sftp-cmds.sh,v 1.16 2024/03/25 03:30:31 dtucker Exp $ +# $OpenBSD: sftp-cmds.sh,v 1.17 2024/03/25 06:05:42 dtucker Exp $ # Placed in the Public Domain. # XXX - TODO: @@ -41,9 +41,8 @@ echo "ls ${OBJ}" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \ # XXX always successful verbose "$tid: shell" -echo "!echo hi there" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \ - || fail "shell failed" -# XXX always successful +echo "!echo hi there" | ${SFTP} -D ${SFTPSERVER} 2>&1 | \ + grep -E '^hi there$' >/dev/null || fail "shell failed" verbose "$tid: pwd" echo "pwd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \ |