From b13bf37f7b4df2900a7d77be82cfab582efcd1bb Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 30 Jul 2025 19:45:29 +0800 Subject: [PATCH] util/build-gnu.sh: Change string matching for tests/ls/time-style-diag.sh We now are closer to what GNU prints, and handle the [posix-] cases that they do. --- util/build-gnu.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/build-gnu.sh b/util/build-gnu.sh index f62701600..e9a549986 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -329,8 +329,10 @@ sed -i -e "s|44 45|48 49|" tests/ls/stat-failed.sh # small difference in the error message # Use GNU sed for /c command -"${SED}" -i -e "/ls: invalid argument 'XX' for 'time style'/,/Try 'ls --help' for more information\./c\ -ls: invalid --time-style argument 'XX'\nPossible values are: [\"full-iso\", \"long-iso\", \"iso\", \"locale\", \"+FORMAT (e.g., +%H:%M) for a 'date'-style format\"]\n\nFor more information try --help" tests/ls/time-style-diag.sh +"${SED}" -i -e "s/ls: invalid argument 'XX' for 'time style'/ls: invalid --time-style argument 'XX'/" \ + -e "s/Valid arguments are:/Possible values are:/" \ + -e "s/Try 'ls --help' for more information./\nFor more information try --help/" \ + tests/ls/time-style-diag.sh # disable two kind of tests: # "hostid BEFORE --help" doesn't fail for GNU. we fail. we are probably doing better