unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: 62420@debbugs.gnu.org
Subject: bug#62420: 29.0.60; fns-tests-collate-strings fails on Cygwin
Date: Fri, 24 Mar 2023 10:52:45 -0400	[thread overview]
Message-ID: <b66fd2be-4b20-bc02-67d9-15aaf0a66b7a@cornell.edu> (raw)

The test in the subject fails on Cygwin as follows:

Test fns-tests-collate-strings condition:
     (ert-test-failed
      ((should-error
        (string-collate-equalp "xyzzy" "xyzzy" "en_DE.UTF-8"))
       :form
       (string-collate-equalp "xyzzy" "xyzzy" "en_DE.UTF-8")
       :value t :fail-reason "did not signal an error"))

The reason is that en_DE.UTF-8 is actually a valid locale on Cygwin.
[Cygwin gets its locale information from Windows.  The latter supports
the RFC 5646 locale "en-DE", which is called "English (Germany)" in the
"Region" settings.]

The following trivial patch fixes the problem:

--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -254,7 +254,7 @@ fns-tests-collate-strings
    (should (string-collate-equalp "xyzzy" "XYZZY" nil t))
     ;; Locale must be valid.
-  (should-error (string-collate-equalp "xyzzy" "xyzzy" "en_DE.UTF-8")))
+  (should-error (string-collate-equalp "xyzzy" "xyzzy" "en_XY.UTF-8")))
   ;; There must be a check for valid codepoints.  (Check not 
implemented yet)
  ;  (should-error


Is this OK for the emacs-29 branch?

[Note: The test will still fail on current Cygwin after this patch; but
that's because of a bug in Cygwin, which has been fixed in the
development sources for Cygwin 3.5.]

Ken





             reply	other threads:[~2023-03-24 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 14:52 Ken Brown [this message]
2023-03-25 12:24 ` bug#62420: 29.0.60; fns-tests-collate-strings fails on Cygwin Eli Zaretskii
2023-03-25 14:27   ` Ken Brown
2023-03-25 14:46     ` Eli Zaretskii
2023-03-25 15:02       ` Corwin Brust
2023-03-25 15:14       ` Ken Brown
2023-03-25 15:49         ` Eli Zaretskii
2023-03-25 16:47           ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b66fd2be-4b20-bc02-67d9-15aaf0a66b7a@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=62420@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).