diff options
| author | Paul Eggert | 2014-04-22 14:32:51 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-04-22 14:32:51 -0700 |
| commit | 42e910349d699ee3f8024371ca1e60e015fc6aa7 (patch) | |
| tree | ba589f3f7c278671f0ae9c5c8f15c241ae8dd674 /test | |
| parent | 4f96579371290b201a973072a1c2f237755bb954 (diff) | |
| parent | 34e856d5ac828753b7be20e2471f39fb613f7f40 (diff) | |
| download | emacs-42e910349d699ee3f8024371ca1e60e015fc6aa7.tar.gz emacs-42e910349d699ee3f8024371ca1e60e015fc6aa7.zip | |
Merge from emacs-24; up to 2014-04-22T20:19:17Z!eggert@cs.ucla.edu
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 13 | ||||
| -rw-r--r-- | test/automated/cl-lib.el | 3 | ||||
| -rw-r--r-- | test/automated/tramp-tests.el | 46 |
3 files changed, 43 insertions, 19 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 1caf0b3eb85..7652e71f5c3 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2014-04-22 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * automated/tramp-tests.el (tramp--test-check-files): Remove traces. | ||
| 4 | (tramp-test30-special-characters): Remove test for backslash. | ||
| 5 | |||
| 6 | 2014-04-20 Michael Albinus <michael.albinus@gmx.de> | ||
| 7 | |||
| 8 | * automated/tramp-tests.el | ||
| 9 | (tramp-test19-directory-files-and-attributes) | ||
| 10 | (tramp-test22-file-times): Check for `file-attributes' equality | ||
| 11 | only if there is a usable timestamp. | ||
| 12 | (tramp--test-check-files): Do not use `copy-sequence'. | ||
| 13 | |||
| 1 | 2014-04-22 Daniel Colascione <dancol@dancol.org> | 14 | 2014-04-22 Daniel Colascione <dancol@dancol.org> |
| 2 | 15 | ||
| 3 | * automated/bytecomp-tests.el (test-byte-comp-compile-and-load): | 16 | * automated/bytecomp-tests.el (test-byte-comp-compile-and-load): |
diff --git a/test/automated/cl-lib.el b/test/automated/cl-lib.el index 48a4c5da251..6bbd9a5e81d 100644 --- a/test/automated/cl-lib.el +++ b/test/automated/cl-lib.el | |||
| @@ -195,6 +195,9 @@ | |||
| 195 | (should (eql (cl-mismatch "Aa" "aA") 0)) | 195 | (should (eql (cl-mismatch "Aa" "aA") 0)) |
| 196 | (should (eql (cl-mismatch '(a b c) '(a b d)) 2))) | 196 | (should (eql (cl-mismatch '(a b c) '(a b d)) 2))) |
| 197 | 197 | ||
| 198 | (ert-deftest cl-lib-test-loop () | ||
| 199 | (should (eql (cl-loop with (a b c) = '(1 2 3) return (+ a b c)) 6))) | ||
| 200 | |||
| 198 | (ert-deftest cl-lib-keyword-names-versus-values () | 201 | (ert-deftest cl-lib-keyword-names-versus-values () |
| 199 | (should (equal | 202 | (should (equal |
| 200 | (funcall (cl-function (lambda (&key a b) (list a b))) | 203 | (funcall (cl-function (lambda (&key a b) (list a b))) |
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el index 607718412fd..b6e757d3ae5 100644 --- a/test/automated/tramp-tests.el +++ b/test/automated/tramp-tests.el | |||
| @@ -1012,14 +1012,22 @@ This tests also `file-readable-p' and `file-regular-p'." | |||
| 1012 | (write-region "boz" nil (expand-file-name "boz" tmp-name2)) | 1012 | (write-region "boz" nil (expand-file-name "boz" tmp-name2)) |
| 1013 | (setq attr (directory-files-and-attributes tmp-name2)) | 1013 | (setq attr (directory-files-and-attributes tmp-name2)) |
| 1014 | (should (consp attr)) | 1014 | (should (consp attr)) |
| 1015 | ;; Dumb remote shells without perl(1) or stat(1) are not | ||
| 1016 | ;; able to return the date correctly. They say "don't know". | ||
| 1015 | (dolist (elt attr) | 1017 | (dolist (elt attr) |
| 1016 | (should | 1018 | (unless |
| 1017 | (equal (file-attributes (expand-file-name (car elt) tmp-name2)) | 1019 | (equal |
| 1018 | (cdr elt)))) | 1020 | (nth 5 |
| 1021 | (file-attributes (expand-file-name (car elt) tmp-name2))) | ||
| 1022 | '(0 0)) | ||
| 1023 | (should | ||
| 1024 | (equal (file-attributes (expand-file-name (car elt) tmp-name2)) | ||
| 1025 | (cdr elt))))) | ||
| 1019 | (setq attr (directory-files-and-attributes tmp-name2 'full)) | 1026 | (setq attr (directory-files-and-attributes tmp-name2 'full)) |
| 1020 | (dolist (elt attr) | 1027 | (dolist (elt attr) |
| 1021 | (should | 1028 | (unless (equal (nth 5 (file-attributes (car elt))) '(0 0)) |
| 1022 | (equal (file-attributes (car elt)) (cdr elt)))) | 1029 | (should |
| 1030 | (equal (file-attributes (car elt)) (cdr elt))))) | ||
| 1023 | (setq attr (directory-files-and-attributes tmp-name2 nil "^b")) | 1031 | (setq attr (directory-files-and-attributes tmp-name2 nil "^b")) |
| 1024 | (should (equal (mapcar 'car attr) '("bar" "boz")))) | 1032 | (should (equal (mapcar 'car attr) '("bar" "boz")))) |
| 1025 | (ignore-errors (delete-directory tmp-name1 'recursive))))) | 1033 | (ignore-errors (delete-directory tmp-name1 'recursive))))) |
| @@ -1142,16 +1150,16 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 1142 | ;; We skip the test, if the remote handler is not able to | 1150 | ;; We skip the test, if the remote handler is not able to |
| 1143 | ;; set the correct time. | 1151 | ;; set the correct time. |
| 1144 | (skip-unless (set-file-times tmp-name1 '(0 1))) | 1152 | (skip-unless (set-file-times tmp-name1 '(0 1))) |
| 1145 | ;; Dumb busyboxes are not able to return the date correctly. | 1153 | ;; Dumb remote shells without perl(1) or stat(1) are not |
| 1146 | ;; They say "don't know. | 1154 | ;; able to return the date correctly. They say "don't know". |
| 1147 | (skip-unless (not (equal (nth 5 (file-attributes tmp-name1)) '(0 0)))) | 1155 | (unless (equal (nth 5 (file-attributes tmp-name1)) '(0 0)) |
| 1148 | (should (equal (nth 5 (file-attributes tmp-name1)) '(0 1))) | 1156 | (should (equal (nth 5 (file-attributes tmp-name1)) '(0 1))) |
| 1149 | (write-region "bla" nil tmp-name2) | 1157 | (write-region "bla" nil tmp-name2) |
| 1150 | (should (file-exists-p tmp-name2)) | 1158 | (should (file-exists-p tmp-name2)) |
| 1151 | (should (file-newer-than-file-p tmp-name2 tmp-name1)) | 1159 | (should (file-newer-than-file-p tmp-name2 tmp-name1)) |
| 1152 | ;; `tmp-name3' does not exist. | 1160 | ;; `tmp-name3' does not exist. |
| 1153 | (should (file-newer-than-file-p tmp-name2 tmp-name3)) | 1161 | (should (file-newer-than-file-p tmp-name2 tmp-name3)) |
| 1154 | (should-not (file-newer-than-file-p tmp-name3 tmp-name1))) | 1162 | (should-not (file-newer-than-file-p tmp-name3 tmp-name1)))) |
| 1155 | (ignore-errors | 1163 | (ignore-errors |
| 1156 | (delete-file tmp-name1) | 1164 | (delete-file tmp-name1) |
| 1157 | (delete-file tmp-name2))))) | 1165 | (delete-file tmp-name2))))) |
| @@ -1446,7 +1454,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 1446 | (sort (copy-sequence files) 'string-lessp))) | 1454 | (sort (copy-sequence files) 'string-lessp))) |
| 1447 | (should (equal (directory-files | 1455 | (should (equal (directory-files |
| 1448 | tmp-name2 nil directory-files-no-dot-files-regexp) | 1456 | tmp-name2 nil directory-files-no-dot-files-regexp) |
| 1449 | (sort (copy-sequence files) 'string-lessp)))) | 1457 | (sort files 'string-lessp)))) |
| 1450 | (ignore-errors (delete-directory tmp-name1 'recursive)) | 1458 | (ignore-errors (delete-directory tmp-name1 'recursive)) |
| 1451 | (ignore-errors (delete-directory tmp-name2 'recursive))))) | 1459 | (ignore-errors (delete-directory tmp-name2 'recursive))))) |
| 1452 | 1460 | ||
| @@ -1455,9 +1463,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 1455 | "Check special characters in file names." | 1463 | "Check special characters in file names." |
| 1456 | (skip-unless (tramp--test-enabled)) | 1464 | (skip-unless (tramp--test-enabled)) |
| 1457 | 1465 | ||
| 1458 | ;; Newlines and slashes in file names are not supported. So we don't test. | 1466 | ;; Newlines, slashes and backslashes in file names are not supported. |
| 1467 | ;; So we don't test. | ||
| 1459 | (tramp--test-check-files | 1468 | (tramp--test-check-files |
| 1460 | " foo bar\tbaz " | 1469 | " foo\tbar baz\t" |
| 1461 | "$foo$bar$$baz$" | 1470 | "$foo$bar$$baz$" |
| 1462 | "-foo-bar-baz-" | 1471 | "-foo-bar-baz-" |
| 1463 | "%foo%bar%baz%" | 1472 | "%foo%bar%baz%" |
| @@ -1465,7 +1474,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 1465 | "?foo?bar?baz?" | 1474 | "?foo?bar?baz?" |
| 1466 | "*foo*bar*baz*" | 1475 | "*foo*bar*baz*" |
| 1467 | "'foo\"bar'baz\"" | 1476 | "'foo\"bar'baz\"" |
| 1468 | "\\foo\\bar\\baz\\" | ||
| 1469 | "#foo#bar#baz#" | 1477 | "#foo#bar#baz#" |
| 1470 | "!foo|bar!baz|" | 1478 | "!foo|bar!baz|" |
| 1471 | ":foo;bar:baz;" | 1479 | ":foo;bar:baz;" |