]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix the string-collation tests on MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Tue, 9 Sep 2014 14:50:32 +0000 (17:50 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 9 Sep 2014 14:50:32 +0000 (17:50 +0300)
 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>.

test/ChangeLog
test/automated/fns-tests.el

index db3a35c3644f56ce64067fcbda08d0e5db8e7113..bcfde995332b1821327fa8c01eb20ccb0a2afe17 100644 (file)
@@ -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.
index 1894b44bf42f5f9335747d1e123119e3d87cea10..56d7ecee49ebc6285f86ade215e7ebb1ce3b8d0e 100644 (file)
    (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.
    (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"))))