busybox/shell/hush_test/hush-read/read_ifs2.right
Denys Vlasenko 44257ad5d0 hush: fix IFS handling in read
$ echo "X:Y:" | (IFS=": " read x y; echo "|$x|$y|")
|X|Y|
$ echo "X:Y  :  " | (IFS=": " read x y; echo "|$x|$y|")
|X|Y|

function                                             old     new   delta
shell_builtin_read                                  1320    1426    +106

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-04-11 17:18:34 +02:00

10 lines
83 B
Plaintext

|X|Y:Z:|
|X|Y:Z|
|X|Y|
|X|Y|
|X||
|X||
|||
Whitespace should be trimmed too:
|X|Y|