Skip to content

tests: date: check that composite specifiers ignore the '-' flag - #339

Closed
sylvestre wants to merge 1 commit into
coreutils:masterfrom
sylvestre:date-composite
Closed

sylvestre wants to merge 1 commit into
coreutils:masterfrom
sylvestre:date-composite

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

* tests/date/date.pl: Add tests ensuring that %-D, %-F, %-T, %-R, %-r,
%-x and %-X keep the default padding of their sub-fields, while the
other flags and the field width still apply to the whole expansion.
uutils/coreutils#14163
@pixelb

pixelb commented Aug 27, 2026

Copy link
Copy Markdown
Member

Hmm the year component does not actually ignore flags on composite specifiers.
That may be unintentional though. I've queried this on the gnulib mailing list,
so will hold off for a while, rather than crystalizing unintended behavior in a test.

@sylvestre

Copy link
Copy Markdown
Contributor Author

Is it a bug or a feature? :)
Thanks and no worries

@pixelb

pixelb commented Aug 27, 2026

Copy link
Copy Markdown
Member

Is it a bug or a feature? :)
Thanks and no worries

I'm not sure yet :) I've asked here
https://lists.gnu.org/archive/html/bug-gnulib/2026-08/msg00305.html

@pixelb

pixelb commented Aug 31, 2026

Copy link
Copy Markdown
Member

I adjusted the year in the tests from 2024 to 2004 as that better tests the padding propagation to %y

@pixelb pixelb closed this Aug 31, 2026
hubot pushed a commit that referenced this pull request Aug 31, 2026
* tests/date/date.pl: Add tests ensuring that %-D, %-F, %-T, %-R, %-r,
%-x and %-X keep the default padding of their sub-fields, while the
other flags and the field width still apply to the whole expansion.
uutils/coreutils#14163

Link: #339
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants