summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2006-01-27 06:49:22 +0000
committerDamien Miller <djm@cvs.openbsd.org>2006-01-27 06:49:22 +0000
commit6b33665c84902d19131467ba3676bbb142b598a1 (patch)
treeb904d53e511a79043600969549d991364659885c /regress/usr.bin
parent894ec78a9bb6bc21843bdb8f97e7db27a356ad0f (diff)
regress test for local to local scp copies; ok dtucker@
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/ssh/scp.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/scp.sh b/regress/usr.bin/ssh/scp.sh
index 6001f6fc8de..10eb58141c6 100644
--- a/regress/usr.bin/ssh/scp.sh
+++ b/regress/usr.bin/ssh/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"
@@ -21,6 +21,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"
@@ -37,6 +42,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}
@@ -50,6 +61,13 @@ cp ${DATA} ${DIR}/copy
$SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed"
diff -rN ${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 -rN ${DIR} ${DIR2} || fail "corrupted copy"
+
verbose "$tid: recursive remote dir to local dir"
scpclean
rm -rf ${DIR2}