1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00

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>.
This commit is contained in:
Eli Zaretskii 2017-09-20 10:16:11 +03:00
parent 965cffd89c
commit f16a8d5dbd
2 changed files with 35 additions and 22 deletions

View File

@ -456,11 +456,14 @@
(funcall create-non-file-buffer "ibuf-test-8a" (funcall create-non-file-buffer "ibuf-test-8a"
:mode #'artist-mode)) :mode #'artist-mode))
(bufB (funcall create-non-file-buffer "*ibuf-test-8b*" :size 32)) (bufB (funcall create-non-file-buffer "*ibuf-test-8b*" :size 32))
(bufC (funcall create-file-buffer "ibuf-test8c" :suffix "*" (bufC (or (memq system-type '(ms-dos windows-nt))
:size 64)) (funcall create-file-buffer "ibuf-test8c" :suffix "*"
(bufD (funcall create-file-buffer "*ibuf-test8d" :size 128)) :size 64)))
(bufE (funcall create-file-buffer "*ibuf-test8e" :suffix "*<2>" (bufD (or (memq system-type '(ms-dos windows-nt))
:size 16)) (funcall create-file-buffer "*ibuf-test8d" :size 128)))
(bufE (or (memq system-type '(ms-dos windows-nt))
(funcall create-file-buffer "*ibuf-test8e"
:suffix "*<2>" :size 16)))
(bufF (and (funcall create-non-file-buffer "*ibuf-test8f*") (bufF (and (funcall create-non-file-buffer "*ibuf-test8f*")
(funcall create-non-file-buffer "*ibuf-test8f*" (funcall create-non-file-buffer "*ibuf-test8f*"
:size 8)))) :size 8))))
@ -479,22 +482,28 @@
(name . "test.*8b") (name . "test.*8b")
(size-gt . 31) (size-gt . 31)
(not visiting-file))))) (not visiting-file)))))
;; MS-DOS and MS-Windows don't allow "*" in file names.
(or (memq system-type '(ms-dos windows-nt))
(should (ibuffer-included-in-filters-p (should (ibuffer-included-in-filters-p
bufC '((and (not (starred-name)) bufC '((and (not (starred-name))
(visiting-file) (visiting-file)
(name . "8c[^*]*\\*") (name . "8c[^*]*\\*")
(size-lt . 65))))) (size-lt . 65))))))
;; MS-DOS and MS-Windows don't allow "*" in file names.
(or (memq system-type '(ms-dos windows-nt))
(should (ibuffer-included-in-filters-p (should (ibuffer-included-in-filters-p
bufD '((and (not (starred-name)) bufD '((and (not (starred-name))
(visiting-file) (visiting-file)
(name . "\\`\\*.*test8d") (name . "\\`\\*.*test8d")
(size-lt . 129) (size-lt . 129)
(size-gt . 127))))) (size-gt . 127))))))
;; MS-DOS and MS-Windows don't allow "*" in file names.
(or (memq system-type '(ms-dos windows-nt))
(should (ibuffer-included-in-filters-p (should (ibuffer-included-in-filters-p
bufE '((and (starred-name) bufE '((and (starred-name)
(visiting-file) (visiting-file)
(name . "8e.*?\\*<[[:digit:]]+>") (name . "8e.*?\\*<[[:digit:]]+>")
(size-gt . 10))))) (size-gt . 10))))))
(should (ibuffer-included-in-filters-p (should (ibuffer-included-in-filters-p
bufF '((and (starred-name) bufF '((and (starred-name)
(not (visiting-file)) (not (visiting-file))

View File

@ -169,7 +169,11 @@
;; Negative UTC offset, as a Lisp integer. ;; Negative UTC offset, as a Lisp integer.
(should (string-equal (should (string-equal
(format-time-string format look -28800) (format-time-string format look -28800)
"1972-06-30 15:59:59.999 -0800 (-08)")) ;; MS-Windows build replaces unrecognizable TZ values,
;; such as "-08", with "ZZZ".
(if (eq system-type 'windows-nt)
"1972-06-30 15:59:59.999 -0800 (ZZZ)"
"1972-06-30 15:59:59.999 -0800 (-08)")))
;; Positive UTC offset that is not an hour multiple, as a string. ;; Positive UTC offset that is not an hour multiple, as a string.
(should (string-equal (should (string-equal
(format-time-string format look "IST-5:30") (format-time-string format look "IST-5:30")