aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2017-09-20 10:16:11 +0300
committerEli Zaretskii2017-09-20 10:16:11 +0300
commitf16a8d5dbd3bb8a319c951bdde9a6a75dbdb8c17 (patch)
treec213182ee3b2e4098dfe8f1b8b35a3b7d11731f7
parent965cffd89cd5727c46a1b0999bef440f8e316742 (diff)
downloademacs-f16a8d5dbd3bb8a319c951bdde9a6a75dbdb8c17.tar.gz
emacs-f16a8d5dbd3bb8a319c951bdde9a6a75dbdb8c17.zip
Fix 2 testsuite tests for MS-Windows
* test/lisp/ibuffer-tests.el (test-buffer-list): Don't try to create files with "*" in their names. * test/src/editfns-tests.el (format-time-string-with-zone): Adapt results to MS-Windows build. Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
-rw-r--r--test/lisp/ibuffer-tests.el51
-rw-r--r--test/src/editfns-tests.el6
2 files changed, 35 insertions, 22 deletions
diff --git a/test/lisp/ibuffer-tests.el b/test/lisp/ibuffer-tests.el
index d65acf60712..35605ca28dc 100644
--- a/test/lisp/ibuffer-tests.el
+++ b/test/lisp/ibuffer-tests.el
@@ -456,11 +456,14 @@
456 (funcall create-non-file-buffer "ibuf-test-8a" 456 (funcall create-non-file-buffer "ibuf-test-8a"
457 :mode #'artist-mode)) 457 :mode #'artist-mode))
458 (bufB (funcall create-non-file-buffer "*ibuf-test-8b*" :size 32)) 458 (bufB (funcall create-non-file-buffer "*ibuf-test-8b*" :size 32))
459 (bufC (funcall create-file-buffer "ibuf-test8c" :suffix "*" 459 (bufC (or (memq system-type '(ms-dos windows-nt))
460 :size 64)) 460 (funcall create-file-buffer "ibuf-test8c" :suffix "*"
461 (bufD (funcall create-file-buffer "*ibuf-test8d" :size 128)) 461 :size 64)))
462 (bufE (funcall create-file-buffer "*ibuf-test8e" :suffix "*<2>" 462 (bufD (or (memq system-type '(ms-dos windows-nt))
463 :size 16)) 463 (funcall create-file-buffer "*ibuf-test8d" :size 128)))
464 (bufE (or (memq system-type '(ms-dos windows-nt))
465 (funcall create-file-buffer "*ibuf-test8e"
466 :suffix "*<2>" :size 16)))
464 (bufF (and (funcall create-non-file-buffer "*ibuf-test8f*") 467 (bufF (and (funcall create-non-file-buffer "*ibuf-test8f*")
465 (funcall create-non-file-buffer "*ibuf-test8f*" 468 (funcall create-non-file-buffer "*ibuf-test8f*"
466 :size 8)))) 469 :size 8))))
@@ -479,22 +482,28 @@
479 (name . "test.*8b") 482 (name . "test.*8b")
480 (size-gt . 31) 483 (size-gt . 31)
481 (not visiting-file))))) 484 (not visiting-file)))))
482 (should (ibuffer-included-in-filters-p 485 ;; MS-DOS and MS-Windows don't allow "*" in file names.
483 bufC '((and (not (starred-name)) 486 (or (memq system-type '(ms-dos windows-nt))
484 (visiting-file) 487 (should (ibuffer-included-in-filters-p
485 (name . "8c[^*]*\\*") 488 bufC '((and (not (starred-name))
486 (size-lt . 65))))) 489 (visiting-file)
487 (should (ibuffer-included-in-filters-p 490 (name . "8c[^*]*\\*")
488 bufD '((and (not (starred-name)) 491 (size-lt . 65))))))
489 (visiting-file) 492 ;; MS-DOS and MS-Windows don't allow "*" in file names.
490 (name . "\\`\\*.*test8d") 493 (or (memq system-type '(ms-dos windows-nt))
491 (size-lt . 129) 494 (should (ibuffer-included-in-filters-p
492 (size-gt . 127))))) 495 bufD '((and (not (starred-name))
493 (should (ibuffer-included-in-filters-p 496 (visiting-file)
494 bufE '((and (starred-name) 497 (name . "\\`\\*.*test8d")
495 (visiting-file) 498 (size-lt . 129)
496 (name . "8e.*?\\*<[[:digit:]]+>") 499 (size-gt . 127))))))
497 (size-gt . 10))))) 500 ;; MS-DOS and MS-Windows don't allow "*" in file names.
501 (or (memq system-type '(ms-dos windows-nt))
502 (should (ibuffer-included-in-filters-p
503 bufE '((and (starred-name)
504 (visiting-file)
505 (name . "8e.*?\\*<[[:digit:]]+>")
506 (size-gt . 10))))))
498 (should (ibuffer-included-in-filters-p 507 (should (ibuffer-included-in-filters-p
499 bufF '((and (starred-name) 508 bufF '((and (starred-name)
500 (not (visiting-file)) 509 (not (visiting-file))
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el
index f910afaf711..70dc9372fad 100644
--- a/test/src/editfns-tests.el
+++ b/test/src/editfns-tests.el
@@ -169,7 +169,11 @@
169 ;; Negative UTC offset, as a Lisp integer. 169 ;; Negative UTC offset, as a Lisp integer.
170 (should (string-equal 170 (should (string-equal
171 (format-time-string format look -28800) 171 (format-time-string format look -28800)
172 "1972-06-30 15:59:59.999 -0800 (-08)")) 172 ;; MS-Windows build replaces unrecognizable TZ values,
173 ;; such as "-08", with "ZZZ".
174 (if (eq system-type 'windows-nt)
175 "1972-06-30 15:59:59.999 -0800 (ZZZ)"
176 "1972-06-30 15:59:59.999 -0800 (-08)")))
173 ;; Positive UTC offset that is not an hour multiple, as a string. 177 ;; Positive UTC offset that is not an hour multiple, as a string.
174 (should (string-equal 178 (should (string-equal
175 (format-time-string format look "IST-5:30") 179 (format-time-string format look "IST-5:30")