GNU bug report logs - #58168
string-lessp glitches and inconsistencies

Previous Next

Package: emacs;

Reported by: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>

Date: Thu, 29 Sep 2022 16:25:01 UTC

Severity: normal

Full log


Message #104 received at 58168 <at> debbugs.gnu.org (full text, mbox):

From: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58168 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#58168: string-lessp glitches and inconsistencies
Date: Fri, 7 Oct 2022 16:45:57 +0200
[Message part 1 (text/plain, inline)]
6 okt. 2022 kl. 16.34 skrev Eli Zaretskii <eliz <at> gnu.org>:

> I don't think it matters much, because whatever we produce we cannot
> be sure it will look identical to the original format string.

I agree. What about this patch then?

[format-error.diff (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]

Not very important, but at least it should be a (minor) improvement.

> A test suite doesn't have to
> assume that the internals work as they should, it should just test
> that.  So testing both sounds to me better than testing just one
> assuming that this one covers both.

I agree, we should definitely test raw bytes inserted from both unibyte and multibyte strings. The current code doesn't do that, hence my patch.

With respect to other values there should be a reasonable qualitative difference between test cases: testing both #x80 and #xfc isn't more useful than testing the display of both the letters 'A' and 'B'. But if you think that the current code is deficient in coverage, please do propose extensions and I'll adapt the patch accordingly.


This bug report was last modified 2 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.