diff options
Diffstat (limited to 'regress/sftp-cmds.sh')
-rw-r--r-- | regress/sftp-cmds.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh index 462c6802f..987887ff0 100644 --- a/regress/sftp-cmds.sh +++ b/regress/sftp-cmds.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: sftp-cmds.sh,v 1.2 2003/01/10 07:52:41 djm Exp $ | 1 | # $OpenBSD: sftp-cmds.sh,v 1.3 2003/04/04 09:34:22 djm Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | # XXX - TODO: | 4 | # XXX - TODO: |
@@ -11,7 +11,7 @@ tid="sftp commands" | |||
11 | DATA=/bin/ls | 11 | DATA=/bin/ls |
12 | COPY=${OBJ}/copy | 12 | COPY=${OBJ}/copy |
13 | 13 | ||
14 | rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.* | 14 | rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 ${BATCH}.* |
15 | 15 | ||
16 | verbose "$tid: lls" | 16 | verbose "$tid: lls" |
17 | echo "lls ${OBJ}" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 17 | echo "lls ${OBJ}" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ |
@@ -66,6 +66,13 @@ echo "rename $COPY ${COPY}.1" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | |||
66 | test -f ${COPY}.1 || fail "missing file after rename" | 66 | test -f ${COPY}.1 || fail "missing file after rename" |
67 | cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename" | 67 | cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename" |
68 | 68 | ||
69 | mkdir ${COPY}.dd | ||
70 | verbose "$tid: rename directory" | ||
71 | echo "rename ${COPY}.dd ${COPY}.dd2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | ||
72 | || fail "rename directory failed" | ||
73 | test -d ${COPY}.dd && fail "oldname exists after rename directory" | ||
74 | test -d ${COPY}.dd2 || fail "missing newname after rename directory" | ||
75 | |||
69 | verbose "$tid: ln" | 76 | verbose "$tid: ln" |
70 | echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed" | 77 | echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed" |
71 | test -L ${COPY}.2 || fail "missing file after ln" | 78 | test -L ${COPY}.2 || fail "missing file after ln" |
@@ -95,6 +102,6 @@ verbose "$tid: lchdir" | |||
95 | echo "lchdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 102 | echo "lchdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ |
96 | || fail "lchdir failed" | 103 | || fail "lchdir failed" |
97 | 104 | ||
98 | rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.* | 105 | rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 ${BATCH}.* |
99 | 106 | ||
100 | 107 | ||