[PATCH] ls.tests: replace printf with $ECHO -ne
Kang-Che Sung
explorer09 at gmail.com
Fri Jun 12 03:31:34 UTC 2026
On Thu, Jun 11, 2026 at 8:08 PM Michael Tokarev via busybox
<busybox at busybox.net> wrote:
>
> testsuite/ls.tests uses printf to produce a filename, but uses
> \xNN escape sequence. Dash (debian default) has printf buult-in,
> but it does not understand \xNN, - it produces literal \xNN
> instead of a single-byte corresponding to the value NN.
> So the test fails.
>
> Replace printf with $ECHO -ne - this one is used elsewhere
> for similar purpose.
>
printf(1) is in POSIX standard, while `echo -ne` is arguably less
portable (according to Autoconf manual).
If the "\xNN" would present a problem, then how about octal escape
sequence ("\NNN" where NNN is octal)?
More information about the busybox
mailing list