GNU bug report logs -
#69822
[PATCH] format-spec pads when it should only truncate
Previous Next
Reported by: Adam Porter <adam <at> alphapapa.net>
Date: Sat, 16 Mar 2024 02:30:02 UTC
Severity: normal
Tags: patch
Done: Adam Porter <adam <at> alphapapa.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 23 Mar 2024 08:59:06 -0500
with message-id <9daed9f2-67d4-4e38-80e8-4a20d4184202 <at> alphapapa.net>
and subject line Re: bug#69822: [PATCH] format-spec pads when it should only truncate
has caused the debbugs.gnu.org bug report #69822,
regarding [PATCH] format-spec pads when it should only truncate
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
69822: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69822
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hi,
Please see the attached patch which fixes a bug in `format-spec': that a
format spec like "%>15t", which is intended to limit the width of a
string to 15 characters, would also pad a string less than that length
to be that length.
Please note the test case which the patch essentially disables: it calls
one of the intermediate functions with arguments which I'm not sure it
would be called with in real usage. I added two test cases to cover the
behavior which the patch is intended to fix, and after editing the
`format-spec--do-flags' to pass the new cases, only that one case
failed; so, since I'm not sure whether it indicates an actual bug, I
disabled it.
Perhaps there exists a real-world scenario to which that test would
apply, but such is not encoded as an end-to-end test of `format-spec'
with a spec string, so it's hard to say.
In other words, this patch fixes a real bug and adds test cases for it.
It also causes an existing case to fail, but since I'm not sure whether
that represents a real bug, that case is now disabled.
All other tests in the file still pass.
Thanks,
Adam
[0001-format-spec-do-flags-Don-t-pad-when-just-truncating.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
On 3/21/24 06:03, Basil L. Contovounesios wrote:
> Adam Porter [2024-03-21 05:47 -0500] wrote:
>
>> I'm happy for it to be closed. (Can the reporter do that, or does
>> it have to be a maintainer? I can't remember, and the tracker's Web pages don't
>> seem to say for certain.)
>
> Anyone can close it. The easiest way is to change the To/Cc address
> from 69822 <at> debbugs.gnu.org to 69822-done <at> debbugs.gnu.org.
Thanks, Basil. Closing...
This bug report was last modified 1 year and 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.