diff options
author | jilles <jilles@FreeBSD.org> | 2015-03-31 20:59:37 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-03-31 20:59:37 +0000 |
commit | 1a2e63b4e8737bf7a3a601a1a0c65282ce82bb94 (patch) | |
tree | f6397a226b143f6e53ccb6ba4056dc3a5999b0e1 /bin/sh/tests/expansion | |
parent | b9ad20386c1d40b8e8a3975deb1eb83caf7e0a7a (diff) | |
download | FreeBSD-src-1a2e63b4e8737bf7a3a601a1a0c65282ce82bb94.zip FreeBSD-src-1a2e63b4e8737bf7a3a601a1a0c65282ce82bb94.tar.gz |
sh: Add more tests for exotic IFS splitting.
Diffstat (limited to 'bin/sh/tests/expansion')
-rw-r--r-- | bin/sh/tests/expansion/Makefile | 2 | ||||
-rw-r--r-- | bin/sh/tests/expansion/ifs6.0 | 6 | ||||
-rw-r--r-- | bin/sh/tests/expansion/ifs7.0 | 5 |
3 files changed, 13 insertions, 0 deletions
diff --git a/bin/sh/tests/expansion/Makefile b/bin/sh/tests/expansion/Makefile index 0c3e89e..e359ae7 100644 --- a/bin/sh/tests/expansion/Makefile +++ b/bin/sh/tests/expansion/Makefile @@ -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 diff --git a/bin/sh/tests/expansion/ifs6.0 b/bin/sh/tests/expansion/ifs6.0 new file mode 100644 index 0000000..be77945 --- /dev/null +++ b/bin/sh/tests/expansion/ifs6.0 @@ -0,0 +1,6 @@ +# $FreeBSD$ + +IFS=': ' +x=': :' +set -- $x +[ "$#|$1|$2|$3" = "2|||" ] diff --git a/bin/sh/tests/expansion/ifs7.0 b/bin/sh/tests/expansion/ifs7.0 new file mode 100644 index 0000000..0cc0834 --- /dev/null +++ b/bin/sh/tests/expansion/ifs7.0 @@ -0,0 +1,5 @@ +# $FreeBSD$ + +IFS=2 +set -- $((123)) +[ "$#|$1|$2|$3" = "2|1|3|" ] |