sh: Add more tests for exotic IFS splitting.

This commit is contained in:
jilles 2015-03-31 20:59:37 +00:00
parent b9ad20386c
commit 1a2e63b4e8
3 changed files with 13 additions and 0 deletions

View File

@ -49,6 +49,8 @@ FILES+= ifs2.0
FILES+= ifs3.0
FILES+= ifs4.0
FILES+= ifs5.0
FILES+= ifs6.0
FILES+= ifs7.0
FILES+= length1.0
FILES+= length2.0
FILES+= length3.0

View File

@ -0,0 +1,6 @@
# $FreeBSD$
IFS=': '
x=': :'
set -- $x
[ "$#|$1|$2|$3" = "2|||" ]

View File

@ -0,0 +1,5 @@
# $FreeBSD$
IFS=2
set -- $((123))
[ "$#|$1|$2|$3" = "2|1|3|" ]