diff options
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sftp-cmds.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh index 7558f5e01..db03c33b8 100644 --- a/regress/sftp-cmds.sh +++ b/regress/sftp-cmds.sh | |||
@@ -17,6 +17,20 @@ do | |||
17 | fi | 17 | fi |
18 | done | 18 | done |
19 | 19 | ||
20 | if [ -x "`which uname 2>&1`" ] | ||
21 | then | ||
22 | case `uname` in | ||
23 | CYGWIN*) | ||
24 | os=cygwin | ||
25 | ;; | ||
26 | *) | ||
27 | os=`uname` | ||
28 | ;; | ||
29 | esac | ||
30 | else | ||
31 | os="unknown" | ||
32 | fi | ||
33 | |||
20 | # Path with embedded quote | 34 | # Path with embedded quote |
21 | QUOTECOPY=${COPY}".\"blah\"" | 35 | QUOTECOPY=${COPY}".\"blah\"" |
22 | QUOTECOPY_ARG=${COPY}'.\"blah\"' | 36 | QUOTECOPY_ARG=${COPY}'.\"blah\"' |
@@ -99,11 +113,13 @@ echo "put $DATA $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | |||
99 | || fail "put failed" | 113 | || fail "put failed" |
100 | cmp $DATA ${COPY} || fail "corrupted copy after put" | 114 | cmp $DATA ${COPY} || fail "corrupted copy after put" |
101 | 115 | ||
116 | if [ "$os" != "cygwin" ]; then | ||
102 | rm -f ${QUOTECOPY} | 117 | rm -f ${QUOTECOPY} |
103 | verbose "$tid: put filename with quotes" | 118 | verbose "$tid: put filename with quotes" |
104 | echo "put $DATA \"$QUOTECOPY_ARG\"" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ | 119 | echo "put $DATA \"$QUOTECOPY_ARG\"" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ |
105 | || fail "put failed" | 120 | || fail "put failed" |
106 | cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes" | 121 | cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes" |
122 | fi | ||
107 | 123 | ||
108 | rm -f ${COPY}.dd/* | 124 | rm -f ${COPY}.dd/* |
109 | verbose "$tid: put to directory" | 125 | verbose "$tid: put to directory" |