- (dtucker) [regress/sftp-cmds.sh] Skip quoted file test on Cygwin.

This commit is contained in:
Darren Tucker 2003-09-07 09:32:58 +10:00
parent e1e26a6c15
commit e7f7580cab
2 changed files with 18 additions and 1 deletions

View File

@ -5,6 +5,7 @@
Add ${EXEEXT}: required to work on Cygwin. Add ${EXEEXT}: required to work on Cygwin.
- (dtucker) [regress/sftp-batch.sh] Make temporary batch file name more - (dtucker) [regress/sftp-batch.sh] Make temporary batch file name more
distinctive, so "rm ${BATCH}.*" doesn't match the script itself. distinctive, so "rm ${BATCH}.*" doesn't match the script itself.
- (dtucker) [regress/sftp-cmds.sh] Skip quoted file test on Cygwin.
20030906 20030906
- (dtucker) [acconfig.h configure.ac uidswap.c] Prefer setuid/setgid on AIX. - (dtucker) [acconfig.h configure.ac uidswap.c] Prefer setuid/setgid on AIX.
@ -1032,4 +1033,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.2965 2003/09/06 23:31:02 dtucker Exp $ $Id: ChangeLog,v 1.2966 2003/09/06 23:32:58 dtucker Exp $

View File

@ -17,6 +17,20 @@ do
fi fi
done done
if [ -x "`which uname 2>&1`" ]
then
case `uname` in
CYGWIN*)
os=cygwin
;;
*)
os=`uname`
;;
esac
else
os="unknown"
fi
# Path with embedded quote # Path with embedded quote
QUOTECOPY=${COPY}".\"blah\"" QUOTECOPY=${COPY}".\"blah\""
QUOTECOPY_ARG=${COPY}'.\"blah\"' QUOTECOPY_ARG=${COPY}'.\"blah\"'
@ -99,11 +113,13 @@ echo "put $DATA $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
|| fail "put failed" || fail "put failed"
cmp $DATA ${COPY} || fail "corrupted copy after put" cmp $DATA ${COPY} || fail "corrupted copy after put"
if [ "$os" != "cygwin" ]; then
rm -f ${QUOTECOPY} rm -f ${QUOTECOPY}
verbose "$tid: put filename with quotes" verbose "$tid: put filename with quotes"
echo "put $DATA \"$QUOTECOPY_ARG\"" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ echo "put $DATA \"$QUOTECOPY_ARG\"" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
|| fail "put failed" || fail "put failed"
cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes" cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes"
fi
rm -f ${COPY}.dd/* rm -f ${COPY}.dd/*
verbose "$tid: put to directory" verbose "$tid: put to directory"