Fix the string-collation tests on MS-Windows.
tests/automated/fns-tests.el (fns-tests-collate-sort): Bind w32-collate-ignore-punctuation to t when sorting according to UTS#10 rules. Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
This commit is contained in:
parent
e2588fa52f
commit
607dab4681
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2014-09-09 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* automated/fns-tests.el (fns-tests-collate-sort): Bind
|
||||
w32-collate-ignore-punctuation to t when sorting according to
|
||||
UTS#10 rules.
|
||||
|
||||
2014-09-07 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* automated/fns-tests.el (fns-tests--collate-enabled-p): New function.
|
||||
|
|
|
@ -169,8 +169,9 @@
|
|||
(equal
|
||||
(sort '("11" "12" "1 1" "1 2" "1.1" "1.2")
|
||||
(lambda (a b)
|
||||
(string-collate-lessp
|
||||
a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8"))))
|
||||
(let ((w32-collate-ignore-punctuation t))
|
||||
(string-collate-lessp
|
||||
a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))))
|
||||
'("11" "1 1" "1.1" "12" "1 2" "1.2")))
|
||||
|
||||
;; Diacritics are different letters for POSIX, they sort lexicographical.
|
||||
|
@ -184,6 +185,7 @@
|
|||
(equal
|
||||
(sort '("Ævar" "Agustín" "Adrian" "Eli")
|
||||
(lambda (a b)
|
||||
(string-collate-lessp
|
||||
a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8"))))
|
||||
(let ((w32-collate-ignore-punctuation t))
|
||||
(string-collate-lessp
|
||||
a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))))
|
||||
'("Adrian" "Ævar" "Agustín" "Eli"))))
|
||||
|
|
Loading…
Add table
Reference in a new issue