1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

stat: improve GNU compatibility (#6933)

* stat: fix the quotes when dealing with %N

and other formats
should fix
tests/stat/stat-fmt.sh

* stats: use an enum instead of a string

* stats: split the functions into smaller functions

* stat: handle byte as a format for better display

* stat: handle error better. should make tests/stat/stat-printf.pl pass

* stat: Some escape sequences are non-standard

* Fix tests

* Take comments into account
This commit is contained in:
Sylvestre Ledru 2024-12-10 08:48:52 +01:00 committed by GitHub
parent 22f3358d47
commit c60203ddd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 440 additions and 231 deletions

View file

@ -204,6 +204,9 @@ sed -i "s|cp: target directory 'symlink': Permission denied|cp: 'symlink' is not
# Our message is a bit better
sed -i "s|cannot create regular file 'no-such/': Not a directory|'no-such/' is not a directory|" tests/mv/trailing-slash.sh
# Our message is better
sed -i "s|warning: unrecognized escape|warning: incomplete hex escape|" tests/stat/stat-printf.pl
sed -i 's|cp |/usr/bin/cp |' tests/mv/hard-2.sh
sed -i 's|paste |/usr/bin/paste |' tests/od/od-endian.sh
sed -i 's|timeout |'"${SYSTEM_TIMEOUT}"' |' tests/tail/follow-stdin.sh