From 607dab4681b3fd2567e4660b3605dedaa125086a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 9 Sep 2014 17:50:32 +0300 Subject: [PATCH] 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 . --- test/ChangeLog | 6 ++++++ test/automated/fns-tests.el | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/test/ChangeLog b/test/ChangeLog index db3a35c3644..bcfde995332 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2014-09-09 Eli Zaretskii + + * 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 * automated/fns-tests.el (fns-tests--collate-enabled-p): New function. diff --git a/test/automated/fns-tests.el b/test/automated/fns-tests.el index 1894b44bf42..56d7ecee49e 100644 --- a/test/automated/fns-tests.el +++ b/test/automated/fns-tests.el @@ -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")))) -- 2.39.5