summaryrefslogtreecommitdiff
path: root/regress/sftp-glob.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/sftp-glob.sh')
-rw-r--r--regress/sftp-glob.sh23
1 files changed, 15 insertions, 8 deletions
diff --git a/regress/sftp-glob.sh b/regress/sftp-glob.sh
index 72bb17d7..8d4df2c9 100644
--- a/regress/sftp-glob.sh
+++ b/regress/sftp-glob.sh
@@ -3,11 +3,18 @@
tid="sftp glob"
+config_defined FILESYSTEM_NO_BACKSLASH && nobs="not supported on this platform"
+
sftp_ls() {
target=$1
errtag=$2
expected=$3
unexpected=$4
+ skip=$5
+ if test "x$skip" != "x" ; then
+ verbose "$tid: $errtag (skipped: $skip)"
+ return
+ fi
verbose "$tid: $errtag"
printf "ls -l %s" "${target}" | \
${SFTP} -b - -D ${SFTPSERVER} 2>/dev/null | \
@@ -44,8 +51,8 @@ SPACE="${DIR}/g-q space"
rm -rf ${BASE}
mkdir -p ${DIR}
-touch "${DATA}" "${GLOB1}" "${GLOB2}" "${QUOTE}"
-touch "${QSLASH}" "${ESLASH}" "${SLASH}" "${SPACE}"
+touch "${DATA}" "${GLOB1}" "${GLOB2}" "${QUOTE}" "${SPACE}"
+test "x$nobs" = "x" && touch "${QSLASH}" "${ESLASH}" "${SLASH}"
# target message expected unexpected
sftp_ls "${DIR}/fil*" "file glob" "${DATA}" ""
@@ -55,14 +62,14 @@ sftp_ls "${DIR}/g-wild\*" "escaped glob" "g-wild*" "g-wildx"
sftp_ls "${DIR}/g-quote\\\"" "escaped quote" "g-quote\"" ""
sftp_ls "\"${DIR}/g-quote\\\"\"" "quoted quote" "g-quote\"" ""
sftp_ls "'${DIR}/g-quote\"'" "single-quoted quote" "g-quote\"" ""
-sftp_ls "${DIR}/g-sl\\\\ash" "escaped slash" "g-sl\\ash" ""
-sftp_ls "'${DIR}/g-sl\\\\ash'" "quoted slash" "g-sl\\ash" ""
-sftp_ls "${DIR}/g-slash\\\\" "escaped slash at EOL" "g-slash\\" ""
-sftp_ls "'${DIR}/g-slash\\\\'" "quoted slash at EOL" "g-slash\\" ""
-sftp_ls "${DIR}/g-qs\\\\\\\"" "escaped slash+quote" "g-qs\\\"" ""
-sftp_ls "'${DIR}/g-qs\\\\\"'" "quoted slash+quote" "g-qs\\\"" ""
sftp_ls "${DIR}/g-q\\ space" "escaped space" "g-q space" ""
sftp_ls "'${DIR}/g-q space'" "quoted space" "g-q space" ""
+sftp_ls "${DIR}/g-sl\\\\ash" "escaped slash" "g-sl\\ash" "" "$nobs"
+sftp_ls "'${DIR}/g-sl\\\\ash'" "quoted slash" "g-sl\\ash" "" "$nobs"
+sftp_ls "${DIR}/g-slash\\\\" "escaped slash at EOL" "g-slash\\" "" "$nobs"
+sftp_ls "'${DIR}/g-slash\\\\'" "quoted slash at EOL" "g-slash\\" "" "$nobs"
+sftp_ls "${DIR}/g-qs\\\\\\\"" "escaped slash+quote" "g-qs\\\"" "" "$nobs"
+sftp_ls "'${DIR}/g-qs\\\\\"'" "quoted slash+quote" "g-qs\\\"" "" "$nobs"
rm -rf ${BASE}