summaryrefslogtreecommitdiff
path: root/test/automated/tramp-tests.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-01-01 10:47:17 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-01-01 10:47:17 -0800
commit6ddd819467d1d9d0e78f13e5a15c1af9125ae67b (patch)
treebb6782a87dc52bed05166ac4ae458998c3418e70 /test/automated/tramp-tests.el
parent935fa6151b3e411c5308d62338744ff25f1a8ddb (diff)
parenta5f90a37622e9d0cb066da413846c1c3f6900b51 (diff)
Merge from origin/emacs-24
a5f90a3 * .gitattributes: New file. 5a9710f Make sure tool-bar changes are reflected on display. 93796ba * autogen.sh: Port better to non-GNU 'cp'. 9758516 Fix a typo in a comment in the previous commit. aa472a3 Fix the pixel coordinates returned by pos-visible-in-window-p. (Bug#19473) d261229 * 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. 9278f05 Omit trailing white space 1c93fd3 Sync with Tramp 2.2.11. 96ebe18 Sync with Tramp 2.2.11. e792450 Sync with Tramp 2.2.11. 2d17e12 Fix ChangeLog entry. 6444482 Fix auto-revert-tail-mode for remote files b5c9c13 Spelling fixes c5504d1 src/w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458) Conflicts: ChangeLog doc/misc/ChangeLog lisp/ChangeLog src/ChangeLog test/ChangeLog
Diffstat (limited to 'test/automated/tramp-tests.el')
-rw-r--r--test/automated/tramp-tests.el34
1 files changed, 20 insertions, 14 deletions
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el
index c59445c3b0..578b81cfac 100644
--- a/test/automated/tramp-tests.el
+++ b/test/automated/tramp-tests.el
@@ -1487,6 +1487,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))
@@ -1495,7 +1503,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)
@@ -1551,24 +1559,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))))
+ 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;"
- "<foo>bar<baz>"
+ (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) "<foo>bar<baz>")
"(foo)bar(baz)"
"[foo]bar[baz]"
"{foo}bar{baz}"))
@@ -1748,10 +1755,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-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'.
;; * Fix `tramp-test34-unload' (Not all symbols are unbound). Set
;; expected error.