From 089e074689d4706ff9d3507146bc489fb4524259 Mon Sep 17 00:00:00 2001 From: dtucker Date: Mon, 25 Mar 2024 06:05:42 +0000 Subject: [PATCH] Verify string returned from local shell command. --- regress/usr.bin/ssh/sftp-cmds.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/regress/usr.bin/ssh/sftp-cmds.sh b/regress/usr.bin/ssh/sftp-cmds.sh index d742bb735a7..a7594bfc098 100644 --- a/regress/usr.bin/ssh/sftp-cmds.sh +++ b/regress/usr.bin/ssh/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: @@ -35,9 +35,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 \ -- 2.20.1