[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31318: emacs-26 fns-tests-collate-sort failure on glibc 2.27
From: |
Eli Zaretskii |
Subject: |
bug#31318: emacs-26 fns-tests-collate-sort failure on glibc 2.27 |
Date: |
Mon, 30 Apr 2018 22:50:29 +0300 |
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Mon, 30 Apr 2018 10:36:31 -0700
>
> I upgraded to Fedora 28 beta over the weekend (Fedora 28 is scheduled
> for release next week) and ran into one test case failure on the
> emacs-26 branch: fns-tests-collate-sort fails (test/src/fns-tests.log is
> attached). Looking into the test, it appears that the test is making
> unportable assumptions about strcoll behavior in non-POSIX locales, an
> assumption that is not true of glibc 2.27 as shipped in Fedora 28.
Really? So you are saying that 'ls' now sorts differently in UTF-8
locales on Fedora 28? That is, it no longer ignores punctuation in
file names? Doesn't that cause user outcry?
> - ;; In a language specific locale, collation order is different.
> - (should (string-collate-lessp
> - "xyzzy" "XYZZY"
> - (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))
> + ;; In a language specific locale on MS-Windows, collation order is
> different.
> + (when (eq system-type 'windows-nt)
> + (should (string-collate-lessp "xyzzy" "XYZZY" "en_US.UTF-8")))
This is backwards: Windows needs enu_USA, not en_US.UTF-8 (which is
not supported on Windows).
> - ;; Diacritics are sorted between similar letters for other locales.
> - (should
> - (equal
> - (sort '("Ævar" "Agustín" "Adrian" "Eli")
> - (lambda (a b)
> - (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"))))
> + ;; Diacritics are sorted between similar letters for other locales,
> + ;; on MS-Windows systems.
> + (when (eq system-type 'windows-nt)
> + (should
> + (equal
> + (sort '("Ævar" "Agustín" "Adrian" "Eli")
> + (lambda (a b)
> + (let ((w32-collate-ignore-punctuation t))
> + (string-collate-lessp
> + a b "enu_USA"))))
> + '("Adrian" "Ævar" "Agustín" "Eli")))))
So none of this now works on Fedora 28? That's too bad, don't you
think? Why did they change the collation order?