summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2006-01-31 10:36:34 +0000
committerDamien Miller <djm@cvs.openbsd.org>2006-01-31 10:36:34 +0000
commitb930d06e65782ba5ebb839f72b697ae8fc5b501b (patch)
treefb7ab3a7f1e9ed3e08a2254c4247570ae102bb0e /regress/usr.bin
parent49095621e503f323a0fb062a81966bf0b3e29811 (diff)
regress test for "scp a b c" where "c" is not a directory
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/ssh/scp.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/scp.sh b/regress/usr.bin/ssh/scp.sh
index f82b988f475..5e653158452 100644
--- a/regress/usr.bin/ssh/scp.sh
+++ b/regress/usr.bin/ssh/scp.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: scp.sh,v 1.6 2006/01/31 10:23:23 djm Exp $
+# $OpenBSD: scp.sh,v 1.7 2006/01/31 10:36:33 djm Exp $
# Placed in the Public Domain.
tid="scp"
@@ -109,5 +109,12 @@ for i in 0 1 2 3 4; do
[ -d ${DIR}/dotpathdir ] && fail "allows dir creation outside of subdir"
done
+verbose "$tid: detect non-directory target"
+scpclean
+echo a > ${COPY}
+echo b > ${COPY2}
+$SCP $scpopts ${DATA} ${COPY} ${COPY2}
+cmp ${COPY} ${COPY2} >/dev/null && fail "corrupt target"
+
scpclean
rm -f ${OBJ}/scp-ssh-wrapper.exe