[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69822: [PATCH] format-spec pads when it should only truncate
From: |
Adam Porter |
Subject: |
bug#69822: [PATCH] format-spec pads when it should only truncate |
Date: |
Fri, 15 Mar 2024 21:28:15 -0500 |
User-agent: |
Mozilla Thunderbird |
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
Description: Text Data
- bug#69822: [PATCH] format-spec pads when it should only truncate,
Adam Porter <=
- bug#69822: [PATCH] format-spec pads when it should only truncate, Eli Zaretskii, 2024/03/16
- bug#69822: [PATCH] format-spec pads when it should only truncate, Adam Porter, 2024/03/17
- bug#69822: [PATCH] format-spec pads when it should only truncate, Eli Zaretskii, 2024/03/17
- bug#69822: [PATCH] format-spec pads when it should only truncate, Basil L. Contovounesios, 2024/03/17
- bug#69822: [PATCH] format-spec pads when it should only truncate, Adam Porter, 2024/03/17
- bug#69822: [PATCH] format-spec pads when it should only truncate, Basil L. Contovounesios, 2024/03/21
- bug#69822: [PATCH] format-spec pads when it should only truncate, Adam Porter, 2024/03/21
- bug#69822: [PATCH] format-spec pads when it should only truncate, Basil L. Contovounesios, 2024/03/21
- bug#69822: [PATCH] format-spec pads when it should only truncate, Adam Porter, 2024/03/23
bug#69822: [PATCH] format-spec pads when it should only truncate, Basil L. Contovounesios, 2024/03/16