On NetBSD 10.0 at least, since commit e4c911bb4, warn_() would issue a warning like "local: set-up: bad variable name". This is due to how its shell handles local with initialization.
* tests/init.sh: Avoid initializing on the same line as "local". --- ChangeLog | 8 ++++++++ tests/init.sh | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5768881205..f4f0172982 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2026-09-01 Pádraig Brady <[email protected]> + + tests: avoid confusing failures with warn_ on NetBSD + On NetBSD 10.0 at least, since commit e4c911bb4, warn_() would + issue a warning like "local: set-up: bad variable name". + This is due to how its shell handles local with initialization. + * tests/init.sh: Avoid initializing on the same line as "local". + 2026-08-31 Bruno Haible <[email protected]> mbrtoc32: Fix test-c32isprint failure with uchar-h-c23. diff --git a/tests/init.sh b/tests/init.sh index e2e4ce8df7..3528c0b5ae 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -103,8 +103,9 @@ warn_ () case $IFS in ' '*) printf '%s\n' "$*" >&2 test $stderr_fileno_ = 2 \ - || { local args=$* - local firstline=${args%%"$gl_init_sh_nl_"*} + || { local args firstline + args=$* + firstline=${args%%"$gl_init_sh_nl_"*} printf '%s\n' "$firstline" >&$stderr_fileno_ } ;; -- 2.55.0
