summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-01-31 22:05:23 +1100
committerDamien Miller <djm@mindrot.org>2006-01-31 22:05:23 +1100
commit0b996462f842e6b5a5d409ad4538e1779dd69bf6 (patch)
treebb0d37ca51af3e434ab2f3c3e215d2020e811538 /regress
parent15a815bb6476ddba55508b177773c9c99c6fe46e (diff)
downloadopenssh-git-0b996462f842e6b5a5d409ad4538e1779dd69bf6.tar.gz
- djm@cvs.openbsd.org 2006/01/27 06:49:21
[scp.sh] regress test for local to local scp copies; ok dtucker@
Diffstat (limited to 'regress')
-rw-r--r--regress/scp.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/regress/scp.sh b/regress/scp.sh
index 1043b8ea..02f54101 100644
--- a/regress/scp.sh
+++ b/regress/scp.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: scp.sh,v 1.4 2005/06/30 11:02:37 markus Exp $
+# $OpenBSD: scp.sh,v 1.5 2006/01/27 06:49:21 djm Exp $
# Placed in the Public Domain.
tid="scp"
@@ -28,6 +28,11 @@ scpclean() {
mkdir ${DIR} ${DIR2}
}
+verbose "$tid: simple copy local file to local file"
+scpclean
+$SCP $scpopts ${DATA} ${COPY} || fail "copy failed"
+cmp ${DATA} ${COPY} || fail "corrupted copy"
+
verbose "$tid: simple copy local file to remote file"
scpclean
$SCP $scpopts ${DATA} somehost:${COPY} || fail "copy failed"
@@ -44,6 +49,12 @@ cp ${DATA} ${COPY}
$SCP $scpopts ${COPY} somehost:${DIR} || fail "copy failed"
cmp ${COPY} ${DIR}/copy || fail "corrupted copy"
+verbose "$tid: simple copy local file to local dir"
+scpclean
+cp ${DATA} ${COPY}
+$SCP $scpopts ${COPY} ${DIR} || fail "copy failed"
+cmp ${COPY} ${DIR}/copy || fail "corrupted copy"
+
verbose "$tid: simple copy remote file to local dir"
scpclean
cp ${DATA} ${COPY}
@@ -57,6 +68,13 @@ cp ${DATA} ${DIR}/copy
$SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed"
diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
+verbose "$tid: recursive local dir to local dir"
+scpclean
+rm -rf ${DIR2}
+cp ${DATA} ${DIR}/copy
+$SCP $scpopts -r ${DIR} ${DIR2} || fail "copy failed"
+diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
+
verbose "$tid: recursive remote dir to local dir"
scpclean
rm -rf ${DIR2}