summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/sftp-cmds.sh16
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
18done 18done
19 19
20if [ -x "`which uname 2>&1`" ]
21then
22 case `uname` in
23 CYGWIN*)
24 os=cygwin
25 ;;
26 *)
27 os=`uname`
28 ;;
29 esac
30else
31 os="unknown"
32fi
33
20# Path with embedded quote 34# Path with embedded quote
21QUOTECOPY=${COPY}".\"blah\"" 35QUOTECOPY=${COPY}".\"blah\""
22QUOTECOPY_ARG=${COPY}'.\"blah\"' 36QUOTECOPY_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"
100cmp $DATA ${COPY} || fail "corrupted copy after put" 114cmp $DATA ${COPY} || fail "corrupted copy after put"
101 115
116if [ "$os" != "cygwin" ]; then
102rm -f ${QUOTECOPY} 117rm -f ${QUOTECOPY}
103verbose "$tid: put filename with quotes" 118verbose "$tid: put filename with quotes"
104echo "put $DATA \"$QUOTECOPY_ARG\"" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 119echo "put $DATA \"$QUOTECOPY_ARG\"" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
105 || fail "put failed" 120 || fail "put failed"
106cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes" 121cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes"
122fi
107 123
108rm -f ${COPY}.dd/* 124rm -f ${COPY}.dd/*
109verbose "$tid: put to directory" 125verbose "$tid: put to directory"