diff options
author | Jilles Tjoelker <jilles@FreeBSD.org> | 2015-08-30 17:24:22 +0000 |
---|---|---|
committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2015-08-30 17:24:22 +0000 |
commit | f0688a48d2dea18ba34187e36b4b87d37726c6b2 (patch) | |
tree | 0f3a0ac1582ca2ea6ce5982cda12d443823790d3 /bin/sh/tests/builtins | |
parent | a7fc139721129fd392d17215a623132eb86d8b69 (diff) | |
download | src-f0688a48d2dea18ba34187e36b4b87d37726c6b2.tar.gz src-f0688a48d2dea18ba34187e36b4b87d37726c6b2.zip |
sh: Fix read with escaped IFS characters at the end.
Characters escaped with a backslash must be treated as if they were not in
IFS. This includes stripping trailing IFS characters.
Notes
Notes:
svn path=/head/; revision=287308
Diffstat (limited to 'bin/sh/tests/builtins')
-rw-r--r-- | bin/sh/tests/builtins/Makefile | 1 | ||||
-rw-r--r-- | bin/sh/tests/builtins/read9.0 | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/bin/sh/tests/builtins/Makefile b/bin/sh/tests/builtins/Makefile index c1e7b6416e4f..46a0b4159a1a 100644 --- a/bin/sh/tests/builtins/Makefile +++ b/bin/sh/tests/builtins/Makefile @@ -123,6 +123,7 @@ FILES+= read5.0 FILES+= read6.0 FILES+= read7.0 FILES+= read8.0 +FILES+= read9.0 FILES+= return1.0 FILES+= return2.1 FILES+= return3.1 diff --git a/bin/sh/tests/builtins/read9.0 b/bin/sh/tests/builtins/read9.0 new file mode 100644 index 000000000000..080549889839 --- /dev/null +++ b/bin/sh/tests/builtins/read9.0 @@ -0,0 +1,10 @@ +# $FreeBSD$ + +empty='' +read a b c <<EOF +\ \ A B\ \ B C\ \ $empty +EOF +read d e <<EOF +D\ $empty +EOF +[ "$a.$b.$c.$d.$e" = " A.B B.C .D ." ] |