Re: Field splitting regression on master branch

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

 



On 21/06/2024 02:33, Martijn Dekker wrote:
As of commit c0674f487c7aec2a3bdf6795cea7e60c9530c360, field splitting is broken. Minimal-ish reproducer:

$ dash -c 'IFS=:; v=" :: :: "; set $v; echo $#'
5

Expected output: 2

This results in 5 in bash, ksh, older dash, yash, everything I can think to test. Whitespace IFS characters is meant to be handled differently from non-whitespace IFS characters, I think 5 is the correct result.

But with IFS=": " instead of IFS=:, the output was previously 4, is supposed to be 4, and has changed to 2; I agree that it looks like dash has introduced a bug here.

Cheers,
Harald van Dijk




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux