[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116482: * automated/tramp-tests.el (tramp-test17-in
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] trunk r116482: * automated/tramp-tests.el (tramp-test17-insert-directory): |
Date: |
Wed, 19 Feb 2014 19:28:40 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116482
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2014-02-19 20:28:32 +0100
message:
* automated/tramp-tests.el (tramp-test17-insert-directory):
Make first line "total 123" optional.
(tramp-test20-file-modes, tramp-test22-file-times)
(tramp-test26-process-file, tramp-test27-start-file-process)
(tramp-test28-shell-command): Skip for tramp-gvfs.el and
tramp-smb.el.
(tramp-test20-file-modes): Check for "root" only when there is an
explicit user name.
(tramp-test21-file-links): Handle "... not supported" error.
(tramp-test22-file-times): Skip for "don't know" return values.
(tramp-test26-process-file, tramp-test28-shell-command):
Remove color escape sequences.
(tramp-test28-shell-command): Use `accept-process-output' rather
than `sit-for'.
(tramp-test30-utf8): Set coding system `utf-8'.
modified:
test/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-8588
test/automated/tramp-tests.el tramptests.el-20131105142319-d9zp3oprkpxj5v1e-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog 2014-02-17 07:05:44 +0000
+++ b/test/ChangeLog 2014-02-19 19:28:32 +0000
@@ -1,3 +1,21 @@
+2014-02-19 Michael Albinus <address@hidden>
+
+ * automated/tramp-tests.el (tramp-test17-insert-directory):
+ Make first line "total 123" optional.
+ (tramp-test20-file-modes, tramp-test22-file-times)
+ (tramp-test26-process-file, tramp-test27-start-file-process)
+ (tramp-test28-shell-command): Skip for tramp-gvfs.el and
+ tramp-smb.el.
+ (tramp-test20-file-modes): Check for "root" only when there is an
+ explicit user name.
+ (tramp-test21-file-links): Handle "... not supported" error.
+ (tramp-test22-file-times): Skip for "don't know" return values.
+ (tramp-test26-process-file, tramp-test28-shell-command):
+ Remove color escape sequences.
+ (tramp-test28-shell-command): Use `accept-process-output' rather
+ than `sit-for'.
+ (tramp-test30-utf8): Set coding system `utf-8'.
+
2014-02-17 Michael Albinus <address@hidden>
* automated/tramp-tests.el (tramp-test28-shell-command): Perform
=== modified file 'test/automated/tramp-tests.el'
--- a/test/automated/tramp-tests.el 2014-02-17 07:05:44 +0000
+++ b/test/automated/tramp-tests.el 2014-02-19 19:28:32 +0000
@@ -822,7 +822,8 @@
(file-name-as-directory tmp-name1) "-al" nil 'full-directory-p)
(goto-char (point-min))
(should
- (looking-at-p "total +[[:digit:]]+\n.+ \\.\n.+ \\.\\.\n.+ foo$"))))
+ (looking-at-p
+ "\\(total +[[:digit:]]+\n\\)?.+ \\.\n.+ \\.\\.\n.+ foo$"))))
(ignore-errors (delete-directory tmp-name1 'recursive)))))
(ert-deftest tramp-test18-file-attributes ()
@@ -905,6 +906,11 @@
"Check `file-modes'.
This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
(skip-unless (tramp--test-enabled))
+ (skip-unless
+ (not
+ (memq
+ (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
+ '(tramp-gvfs-file-name-handler tramp-smb-file-name-handler))))
(tramp-cleanup-connection
(tramp-dissect-file-name tramp-test-temporary-file-directory)
nil 'keep-password)
@@ -922,7 +928,8 @@
(should (= (file-modes tmp-name) #o444))
(should-not (file-executable-p tmp-name))
;; A file is always writable for user "root".
- (unless (string-equal (file-remote-p tmp-name 'user) "root")
+ (when (and (stringp (file-remote-p tmp-name 'user))
+ (not (string-equal (file-remote-p tmp-name 'user) "root")))
(should-not (file-writable-p tmp-name))))
(ignore-errors (delete-file tmp-name)))))
@@ -941,7 +948,15 @@
(progn
(write-region "foo" nil tmp-name1)
(should (file-exists-p tmp-name1))
- (make-symbolic-link tmp-name1 tmp-name2)
+ ;; Method "smb" supports `make-symbolic-link' only if the
+ ;; remote host has CIFS capabilities. tramp-adb.el and
+ ;; tramp-gvfs.el do not support symbolic links at all.
+ (condition-case err
+ (make-symbolic-link tmp-name1 tmp-name2)
+ (file-error
+ (skip-unless
+ (not (string-equal (error-message-string err)
+ "make-symbolic-link not supported")))))
(should (file-symlink-p tmp-name2))
(should-error (make-symbolic-link tmp-name1 tmp-name2))
(make-symbolic-link tmp-name1 tmp-name2 'ok-if-already-exists)
@@ -983,6 +998,11 @@
(ert-deftest tramp-test22-file-times ()
"Check `set-file-times' and `file-newer-than-file-p'."
(skip-unless (tramp--test-enabled))
+ (skip-unless
+ (not
+ (memq
+ (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
+ '(tramp-gvfs-file-name-handler tramp-smb-file-name-handler))))
(tramp-cleanup-connection
(tramp-dissect-file-name tramp-test-temporary-file-directory)
nil 'keep-password)
@@ -997,6 +1017,9 @@
(should (consp (nth 5 (file-attributes tmp-name1))))
;; '(0 0) means don't know, and will be replaced by `current-time'.
(set-file-times tmp-name1 '(0 1))
+ ;; Dumb busyboxes are not able to return the date correctly.
+ ;; They say "don't know.
+ (skip-unless (not (equal (nth 5 (file-attributes tmp-name1)) '(0 0))))
(should (equal (nth 5 (file-attributes tmp-name1)) '(0 1)))
(write-region "bla" nil tmp-name2)
(should (file-exists-p tmp-name2))
@@ -1077,6 +1100,11 @@
(ert-deftest tramp-test26-process-file ()
"Check `process-file'."
(skip-unless (tramp--test-enabled))
+ (skip-unless
+ (not
+ (memq
+ (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
+ '(tramp-gvfs-file-name-handler tramp-smb-file-name-handler))))
(tramp-cleanup-connection
(tramp-dissect-file-name tramp-test-temporary-file-directory)
nil 'keep-password)
@@ -1096,6 +1124,10 @@
(should
(zerop
(process-file "ls" nil t nil (file-name-nondirectory tmp-name))))
+ ;; `ls' could produce colorized output.
+ (goto-char (point-min))
+ (while (re-search-forward tramp-color-escape-sequence-regexp nil t)
+ (replace-match "" nil nil))
(should
(string-equal
(format "%s\n" (file-name-nondirectory tmp-name))
@@ -1105,6 +1137,11 @@
(ert-deftest tramp-test27-start-file-process ()
"Check `start-file-process'."
(skip-unless (tramp--test-enabled))
+ (skip-unless
+ (not
+ (memq
+ (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
+ '(tramp-gvfs-file-name-handler tramp-smb-file-name-handler))))
(tramp-cleanup-connection
(tramp-dissect-file-name tramp-test-temporary-file-directory)
nil 'keep-password)
@@ -1153,6 +1190,11 @@
(ert-deftest tramp-test28-shell-command ()
"Check `shell-command'."
(skip-unless (tramp--test-enabled))
+ (skip-unless
+ (not
+ (memq
+ (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
+ '(tramp-gvfs-file-name-handler tramp-smb-file-name-handler))))
(tramp-cleanup-connection
(tramp-dissect-file-name tramp-test-temporary-file-directory)
nil 'keep-password)
@@ -1165,6 +1207,10 @@
(should (file-exists-p tmp-name))
(shell-command
(format "ls %s" (file-name-nondirectory tmp-name)) (current-buffer))
+ ;; `ls' could produce colorized output.
+ (goto-char (point-min))
+ (while (re-search-forward tramp-color-escape-sequence-regexp nil t)
+ (replace-match "" nil nil))
(should
(string-equal
(format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
@@ -1176,11 +1222,15 @@
(should (file-exists-p tmp-name))
(async-shell-command
(format "ls %s" (file-name-nondirectory tmp-name)) (current-buffer))
- (sit-for 1 'nodisplay)
+ (accept-process-output (get-buffer-process (current-buffer)) 1)
(while (ignore-errors
(memq (process-status (get-buffer-process (current-buffer)))
'(run open)))
- (sit-for 1 'nodisplay))
+ (accept-process-output (get-buffer-process (current-buffer)) 1))
+ ;; `ls' could produce colorized output.
+ (goto-char (point-min))
+ (while (re-search-forward tramp-color-escape-sequence-regexp nil t)
+ (replace-match "" nil nil))
(should
(string-equal
(format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
@@ -1194,11 +1244,11 @@
(process-send-string
(get-buffer-process (current-buffer))
(format "%s\n" (file-name-nondirectory tmp-name)))
- (sit-for 1 'nodisplay)
+ (accept-process-output (get-buffer-process (current-buffer)) 1)
(while (ignore-errors
(memq (process-status (get-buffer-process (current-buffer)))
'(run open)))
- (sit-for 1 'nodisplay))
+ (accept-process-output (get-buffer-process (current-buffer)) 1))
(should
(string-equal
(format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
@@ -1260,6 +1310,8 @@
nil 'keep-password)
(let ((tmp-name (tramp--test-make-temp-name))
+ (coding-system-for-read 'utf-8)
+ (coding-system-for-write 'utf-8)
(arabic "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية
لتصفحها بلا اتصال بالإنترنت")
(chinese "银河系漫游指南系列")
(russian "Автостопом по гала́ктике"))
@@ -1293,10 +1345,10 @@
;; * set-file-selinux-context
;; * Fix `tramp-test17-insert-directory' for
-;; `ls-lisp-insert-directory' ("plink" and friends).
-;; * Fix `tramp-test27-start-file-process' on MS Windows
-;; (`process-send-eof'?).
-;; * Fix `tramp-test29-utf8' on MS Windows.
+;; `ls-lisp-insert-directory' ("plink" and friends, tramp-gvfs.el).
+;; * Fix `tramp-test27-start-file-process' on MS Windows (`process-send-eof'?).
+;; * Fix `tramp-test28-shell-command' on MS Windows (`process-send-eof'?).
+;; * Fix `tramp-test30-utf8' on MS Windows. Seems to be in `directory-files'.
(defun tramp-test-all (&optional interactive)
"Run all tests for \\[tramp]."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116482: * automated/tramp-tests.el (tramp-test17-insert-directory):,
Michael Albinus <=