- djm@cvs.openbsd.org 2006/01/31 10:36:33
     [scp.sh]
     regress test for "scp a b c" where "c" is not a directory
diff --git a/regress/scp.sh b/regress/scp.sh
index bfda670..c5d412d 100644
--- a/regress/scp.sh
+++ b/regress/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"
@@ -116,5 +116,12 @@
 	[ -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.scp