[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116983: * automated/tramp-tests.el (tramp--test-
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs-24 r116983: * automated/tramp-tests.el (tramp--test-check-files): Extend test. |
Date: |
Sat, 19 Apr 2014 14:14:31 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116983
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: emacs-24
timestamp: Sat 2014-04-19 16:14:26 +0200
message:
* automated/tramp-tests.el (tramp--test-check-files): Extend test.
(tramp-test31-utf8): Let-bind also `file-name-coding-system'.
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-04-18 18:58:13 +0000
+++ b/test/ChangeLog 2014-04-19 14:14:26 +0000
@@ -1,3 +1,8 @@
+2014-04-19 Michael Albinus <address@hidden>
+
+ * automated/tramp-tests.el (tramp--test-check-files): Extend test.
+ (tramp-test31-utf8): Let-bind also `file-name-coding-system'.
+
2014-04-18 Michael Albinus <address@hidden>
* automated/tramp-tests.el (tramp-copy-size-limit): Set to nil.
=== modified file 'test/automated/tramp-tests.el'
--- a/test/automated/tramp-tests.el 2014-04-18 18:58:13 +0000
+++ b/test/automated/tramp-tests.el 2014-04-19 14:14:26 +0000
@@ -1418,23 +1418,37 @@
(defun tramp--test-check-files (&rest files)
"Runs a simple but comprehensive test over every file in FILES."
- (let ((tmp-name (tramp--test-make-temp-name)))
+ (let ((tmp-name1 (tramp--test-make-temp-name))
+ (tmp-name2 (tramp--test-make-temp-name 'local)))
(unwind-protect
(progn
- (make-directory tmp-name)
+ (make-directory tmp-name1)
+ (make-directory tmp-name2)
(dolist (elt files)
- (let ((file (expand-file-name elt tmp-name)))
- (write-region elt nil file)
- (should (file-exists-p file))
+ (let ((file1 (expand-file-name elt tmp-name1))
+ (file2 (expand-file-name elt tmp-name2)))
+ (write-region elt nil file1)
+ (should (file-exists-p file1))
;; Check file contents.
(with-temp-buffer
- (insert-file-contents file)
- (should (string-equal (buffer-string) elt)))))
+ (insert-file-contents file1)
+ (should (string-equal (buffer-string) elt)))
+ ;; Copy file both directions.
+ (copy-file file1 tmp-name2)
+ (should (file-exists-p file2))
+ (delete-file file1)
+ (should-not (file-exists-p file1))
+ (copy-file file2 tmp-name1)
+ (should (file-exists-p file1))))
;; Check file names.
(should (equal (directory-files
- tmp-name nil directory-files-no-dot-files-regexp)
- (sort files 'string-lessp))))
- (ignore-errors (delete-directory tmp-name 'recursive)))))
+ tmp-name1 nil directory-files-no-dot-files-regexp)
+ (sort (copy-sequence files) 'string-lessp)))
+ (should (equal (directory-files
+ tmp-name2 nil directory-files-no-dot-files-regexp)
+ (sort (copy-sequence files) 'string-lessp))))
+ (ignore-errors (delete-directory tmp-name1 'recursive))
+ (ignore-errors (delete-directory tmp-name2 'recursive)))))
;; This test is inspired by Bug#17238.
(ert-deftest tramp-test30-special-characters ()
@@ -1463,11 +1477,12 @@
(skip-unless (tramp--test-enabled))
(let ((coding-system-for-read 'utf-8)
- (coding-system-for-write 'utf-8))
- (tramp--test-check-files
- "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها
بلا اتصال بالإنترنت"
- "银河系漫游指南系列"
- "Автостопом по гала́ктике")))
+ (coding-system-for-write 'utf-8)
+ (file-name-coding-system 'utf-8))
+ (tramp--test-check-files
+ "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا
اتصال بالإنترنت"
+ "银河系漫游指南系列"
+ "Автостопом по гала́ктике")))
;; This test is inspired by Bug#16928.
(ert-deftest tramp-test32-asynchronous-requests ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116983: * automated/tramp-tests.el (tramp--test-check-files): Extend test.,
Michael Albinus <=