On Fri, Dec 8, 2023 at 2:03 PM Bart Schaefer wrote: > The test is confirming that zexpandtabs() doesn't infinite-loop on broken > multibyte input which might include nul bytes. Could replace the "tr" with > something else. > E.g. (not bothering to worry about gmail wrapping here) diff --git a/Test/B03print.ztst b/Test/B03print.ztst index 4d2cf9764..93a9669b0 100644 --- a/Test/B03print.ztst +++ b/Test/B03print.ztst @@ -305,8 +305,9 @@ foo+=$'\tone\ttwo\tthree\tfour\n' foo+=$'\t\tone\t\ttwo\t\tthree\t\tfour' foo+='\0' # regression test for multibyte tab expand - print -x4 $foo | tr '\0' Z # avoid raw nul byte in expected output below - print -X4 $foo | tr '\0' Z + # avoid raw nul byte in expected output below + print ${"$(print -x4 $foo)"/$'\0'/Z} + print ${"$(print -X4 $foo)"/$'\0'/Z} 0:Tab expansion by print >one two three four > one two three four