coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] test: tac: test with non-ASCII values for --separator


From: Pádraig Brady
Subject: Re: [PATCH] test: tac: test with non-ASCII values for --separator
Date: Fri, 28 Nov 2025 20:09:09 +0000
User-agent: Mozilla Thunderbird Beta

On 28/11/2025 20:05, Collin Funk wrote:
Pádraig Brady <P@draigBrady.com> writes:

On 28/11/2025 00:57, Collin Funk wrote:
+print_ver_ tac

I'd also rely on printf

Right. Don't we also need to use 'env' to make sure a shell builtin
doesn't get used?

+  tac --separator=$(printf "$1") inp > out && printf '\n' >> out \
+    || framework_failure_

Since we're testing tac, I'd explicitly check its return value.
Also this looks under quoted, so I'd change to:

   tac --separator="$(printf -- "$1")" inp > out || fail=1
   printf '\n' >> out || framework_failure_

Good catch.

I'll probably add another test to make sure invalid UTF-8 is treated as
bytes.

Okay to move bad_unicode() from tests/fold/fold-characters.sh to
init.cfg? I'm sure it will be useful for other tests as well, since it
checks a few different ways UTF-8 can be bad.

All sounds good.

cheers,
Padraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]