summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2022-03-31 03:07:34 +0000
committerDamien Miller <djm@cvs.openbsd.org>2022-03-31 03:07:34 +0000
commitf1eb25949a9b5b52c030365f50dc4521d60c9ab7 (patch)
tree1017d2a7e1ea2c46bfcbddb2fb36a5132860eb3c /regress/usr.bin
parent10fd8b7e1f7250925c10a21ec244471ead3489da (diff)
regression test for sftp cp command
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/ssh/sftp-cmds.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/sftp-cmds.sh b/regress/usr.bin/ssh/sftp-cmds.sh
index 31007655e6e..7f79b53b821 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.14 2013/06/21 02:26:26 djm Exp $
+# $OpenBSD: sftp-cmds.sh,v 1.15 2022/03/31 03:07:33 djm Exp $
# Placed in the Public Domain.
# XXX - TODO:
@@ -191,6 +191,11 @@ rm -f ${COPY}.2
echo "ln -s ${COPY}.1 ${COPY}.2" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "ln -s failed"
test -L ${COPY}.2 || fail "missing file after ln -s"
+verbose "$tid: cp"
+rm -f ${COPY}.2
+echo "cp ${COPY}.1 ${COPY}.2" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "cp failed"
+cmp ${COPY}.1 ${COPY}.2 || fail "created file is not equal after cp"
+
verbose "$tid: mkdir"
echo "mkdir ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
|| fail "mkdir failed"