aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaniel Colascione2014-04-19 13:32:05 -0700
committerDaniel Colascione2014-04-19 13:32:05 -0700
commit6dfa19c50f75c1892f5c9a48104ddd532796d089 (patch)
tree4477c00776774800f4e0a0fdbe0d04173e1f6ba4 /test
parent2123570f1b0b7d3061c4a365555c87e2cfaa4320 (diff)
parentd7b659bb0615d326f79b2ea96b2acd90b816c3c0 (diff)
downloademacs-6dfa19c50f75c1892f5c9a48104ddd532796d089.tar.gz
emacs-6dfa19c50f75c1892f5c9a48104ddd532796d089.zip
Merge from emacs-24; up to 2014-04-17T02:05:48Z!eggert@cs.ucla.edu
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/automated/tramp-tests.el45
2 files changed, 35 insertions, 15 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 4986280f5f1..338a825f51e 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
12014-04-19 Michael Albinus <michael.albinus@gmx.de>
2
3 * automated/tramp-tests.el (tramp--test-check-files): Extend test.
4 (tramp-test31-utf8): Let-bind also `file-name-coding-system'.
5
12014-04-18 Michael Albinus <michael.albinus@gmx.de> 62014-04-18 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * automated/tramp-tests.el (tramp-copy-size-limit): Set to nil. 8 * automated/tramp-tests.el (tramp-copy-size-limit): Set to nil.
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el
index dff9103c4a7..607718412fd 100644
--- a/test/automated/tramp-tests.el
+++ b/test/automated/tramp-tests.el
@@ -1418,23 +1418,37 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
1418 1418
1419(defun tramp--test-check-files (&rest files) 1419(defun tramp--test-check-files (&rest files)
1420 "Runs a simple but comprehensive test over every file in FILES." 1420 "Runs a simple but comprehensive test over every file in FILES."
1421 (let ((tmp-name (tramp--test-make-temp-name))) 1421 (let ((tmp-name1 (tramp--test-make-temp-name))
1422 (tmp-name2 (tramp--test-make-temp-name 'local)))
1422 (unwind-protect 1423 (unwind-protect
1423 (progn 1424 (progn
1424 (make-directory tmp-name) 1425 (make-directory tmp-name1)
1426 (make-directory tmp-name2)
1425 (dolist (elt files) 1427 (dolist (elt files)
1426 (let ((file (expand-file-name elt tmp-name))) 1428 (let ((file1 (expand-file-name elt tmp-name1))
1427 (write-region elt nil file) 1429 (file2 (expand-file-name elt tmp-name2)))
1428 (should (file-exists-p file)) 1430 (write-region elt nil file1)
1431 (should (file-exists-p file1))
1429 ;; Check file contents. 1432 ;; Check file contents.
1430 (with-temp-buffer 1433 (with-temp-buffer
1431 (insert-file-contents file) 1434 (insert-file-contents file1)
1432 (should (string-equal (buffer-string) elt))))) 1435 (should (string-equal (buffer-string) elt)))
1436 ;; Copy file both directions.
1437 (copy-file file1 tmp-name2)
1438 (should (file-exists-p file2))
1439 (delete-file file1)
1440 (should-not (file-exists-p file1))
1441 (copy-file file2 tmp-name1)
1442 (should (file-exists-p file1))))
1433 ;; Check file names. 1443 ;; Check file names.
1434 (should (equal (directory-files 1444 (should (equal (directory-files
1435 tmp-name nil directory-files-no-dot-files-regexp) 1445 tmp-name1 nil directory-files-no-dot-files-regexp)
1436 (sort files 'string-lessp)))) 1446 (sort (copy-sequence files) 'string-lessp)))
1437 (ignore-errors (delete-directory tmp-name 'recursive))))) 1447 (should (equal (directory-files
1448 tmp-name2 nil directory-files-no-dot-files-regexp)
1449 (sort (copy-sequence files) 'string-lessp))))
1450 (ignore-errors (delete-directory tmp-name1 'recursive))
1451 (ignore-errors (delete-directory tmp-name2 'recursive)))))
1438 1452
1439;; This test is inspired by Bug#17238. 1453;; This test is inspired by Bug#17238.
1440(ert-deftest tramp-test30-special-characters () 1454(ert-deftest tramp-test30-special-characters ()
@@ -1463,11 +1477,12 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
1463 (skip-unless (tramp--test-enabled)) 1477 (skip-unless (tramp--test-enabled))
1464 1478
1465 (let ((coding-system-for-read 'utf-8) 1479 (let ((coding-system-for-read 'utf-8)
1466 (coding-system-for-write 'utf-8)) 1480 (coding-system-for-write 'utf-8)
1467 (tramp--test-check-files 1481 (file-name-coding-system 'utf-8))
1468 "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت" 1482 (tramp--test-check-files
1469 "银河系漫游指南系列" 1483 "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت"
1470 "Автостопом по гала́ктике"))) 1484 "银河系漫游指南系列"
1485 "Автостопом по гала́ктике")))
1471 1486
1472;; This test is inspired by Bug#16928. 1487;; This test is inspired by Bug#16928.
1473(ert-deftest tramp-test32-asynchronous-requests () 1488(ert-deftest tramp-test32-asynchronous-requests ()