From 96ebe180f2d45dfdeaec7b0daeb08e6cf788f06e Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 29 Dec 2014 17:35:09 +0100 Subject: Sync with Tramp 2.2.11. * automated/tramp-tests.el (tramp-test30-special-characters): Skip test on MS-Windows. --- test/automated/tramp-tests.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/automated/tramp-tests.el') diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el index 317ce12fc8..f80b7d4b8a 100644 --- a/test/automated/tramp-tests.el +++ b/test/automated/tramp-tests.el @@ -1547,6 +1547,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." '(tramp-adb-file-name-handler tramp-gvfs-file-name-handler tramp-smb-file-name-handler)))) + ;; Bug#19463. + (skip-unless (not (eq system-type 'windows-nt))) ;; Newlines, slashes and backslashes in file names are not supported. ;; So we don't test. @@ -1742,10 +1744,9 @@ Since it unloads Tramp, it shall be the last test to run." ;; doesn't work well when an interactive password must be provided. ;; * Fix `tramp-test27-start-file-process' for `nc' and on MS ;; Windows (`process-send-eof'?). -;; * Fix `tramp-test28-shell-command' on MS Windows (nasty plink message). ;; * Fix `tramp-test30-special-characters' for `adb', `nc' and `smb'. -;; * Fix `tramp-test31-utf8' for MS Windows and `nc'/`telnet' (when -;; target is a dumb busybox). Seems to be in `directory-files'. +;; * Fix `tramp-test31-utf8' for `nc'/`telnet' (when target is a dumb +;; busybox). Seems to be in `directory-files'. ;; * Fix Bug#16928. Set expected error of `tramp-test32-asynchronous-requests'. ;; * Fix `tramp-test34-unload' (Not all symbols are unbound). Set ;; expected error. -- cgit v1.2.3 From d2612290f973ed70d973292d728cbe12a7f722fb Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 30 Dec 2014 12:45:48 +0100 Subject: * automated/tramp-tests.el (tramp--test-smb-or-windows-nt-p): New defun. (tramp-test30-special-characters): Use it. (tramp--test-check-files): Filter nil file names out. --- test/ChangeLog | 7 +++++++ test/automated/tramp-tests.el | 31 ++++++++++++++++++------------- 2 files changed, 25 insertions(+), 13 deletions(-) (limited to 'test/automated/tramp-tests.el') diff --git a/test/ChangeLog b/test/ChangeLog index 0e4e852bf8..720f60bb7e 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,10 @@ +2014-12-30 Michael Albinus + + * automated/tramp-tests.el (tramp--test-smb-or-windows-nt-p): + New defun. + (tramp-test30-special-characters): Use it. (Bug#19463) + (tramp--test-check-files): Filter nil file names out. + 2014-12-29 Michael Albinus Sync with Tramp 2.2.11. diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el index f80b7d4b8a..8e48b28042 100644 --- a/test/automated/tramp-tests.el +++ b/test/automated/tramp-tests.el @@ -1481,6 +1481,14 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (ignore-errors (delete-directory tmp-name1 'recursive))))) +(defun tramp--test-smb-or-windows-nt-p () + "Check, whether the locale or remote host runs MS Windows. +This requires restrictions of file name syntax." + (or (eq system-type 'windows-nt) + (eq (tramp-find-foreign-file-name-handler + tramp-test-temporary-file-directory) + 'tramp-smb-file-name-handler))) + (defun tramp--test-check-files (&rest files) "Runs a simple but comprehensive test over every file in FILES." (let ((tmp-name1 (tramp--test-make-temp-name)) @@ -1489,7 +1497,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (progn (make-directory tmp-name1) (make-directory tmp-name2) - (dolist (elt files) + (dolist (elt (delq nil files)) (let ((file1 (expand-file-name elt tmp-name1)) (file2 (expand-file-name elt tmp-name2))) (write-region elt nil file1) @@ -1545,26 +1553,23 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (memq (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory) '(tramp-adb-file-name-handler - tramp-gvfs-file-name-handler - tramp-smb-file-name-handler)))) - ;; Bug#19463. - (skip-unless (not (eq system-type 'windows-nt))) + tramp-gvfs-file-name-handler)))) ;; Newlines, slashes and backslashes in file names are not supported. ;; So we don't test. (tramp--test-check-files - " foo\tbar baz\t" + (if (tramp--test-smb-or-windows-nt-p) "foo bar baz" " foo\tbar baz\t") "$foo$bar$$baz$" "-foo-bar-baz-" "%foo%bar%baz%" "&foo&bar&baz&" - "?foo?bar?baz?" - "*foo*bar*baz*" - "'foo\"bar'baz\"" + (unless (tramp--test-smb-or-windows-nt-p) "?foo?bar?baz?") + (unless (tramp--test-smb-or-windows-nt-p) "*foo*bar*baz*") + (if (tramp--test-smb-or-windows-nt-p) "'foo'bar'baz'" "'foo\"bar'baz\"") "#foo~bar#baz~" - "!foo|bar!baz|" - ":foo;bar:baz;" - "bar" + (if (tramp--test-smb-or-windows-nt-p) "!foo!bar!baz!" "!foo|bar!baz|") + (if (tramp--test-smb-or-windows-nt-p) ";foo;bar;baz;" ":foo;bar:baz;") + (unless (tramp--test-smb-or-windows-nt-p) "bar") "(foo)bar(baz)" "[foo]bar[baz]" "{foo}bar{baz}")) @@ -1744,7 +1749,7 @@ Since it unloads Tramp, it shall be the last test to run." ;; doesn't work well when an interactive password must be provided. ;; * Fix `tramp-test27-start-file-process' for `nc' and on MS ;; Windows (`process-send-eof'?). -;; * Fix `tramp-test30-special-characters' for `adb', `nc' and `smb'. +;; * Fix `tramp-test30-special-characters' for `adb' and `nc'. ;; * Fix `tramp-test31-utf8' for `nc'/`telnet' (when target is a dumb ;; busybox). Seems to be in `directory-files'. ;; * Fix Bug#16928. Set expected error of `tramp-test32-asynchronous-requests'. -- cgit v1.2.3