summaryrefslogtreecommitdiffstats
path: root/bin/sh/tests
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2015-08-16 12:57:17 +0000
committerjilles <jilles@FreeBSD.org>2015-08-16 12:57:17 +0000
commit718cf25701716f09aa96832c64151fb8aa286279 (patch)
tree7c41f69ffd432061f9f8d27e82b41ee9801a1373 /bin/sh/tests
parentbc522110e39ea6c6e4335ea0315ad6872e6e0705 (diff)
downloadFreeBSD-src-718cf25701716f09aa96832c64151fb8aa286279.zip
FreeBSD-src-718cf25701716f09aa96832c64151fb8aa286279.tar.gz
sh: Backslash-newline should not affect field splitting in read builtin.
This was originally broken in r212339 in 2010.
Diffstat (limited to 'bin/sh/tests')
-rw-r--r--bin/sh/tests/builtins/Makefile1
-rw-r--r--bin/sh/tests/builtins/read8.017
2 files changed, 18 insertions, 0 deletions
diff --git a/bin/sh/tests/builtins/Makefile b/bin/sh/tests/builtins/Makefile
index ad39aac..f3c1dc7 100644
--- a/bin/sh/tests/builtins/Makefile
+++ b/bin/sh/tests/builtins/Makefile
@@ -121,6 +121,7 @@ FILES+= read4.0 read4.0.stdout
FILES+= read5.0
FILES+= read6.0
FILES+= read7.0
+FILES+= read8.0
FILES+= return1.0
FILES+= return2.1
FILES+= return3.1
diff --git a/bin/sh/tests/builtins/read8.0 b/bin/sh/tests/builtins/read8.0
new file mode 100644
index 0000000..fb786ff
--- /dev/null
+++ b/bin/sh/tests/builtins/read8.0
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+read a b c <<\EOF
+\
+A\
+ \
+ \
+ \
+B\
+ \
+ \
+C\
+ \
+ \
+ \
+EOF
+[ "$a.$b.$c" = "A.B.C" ]
OpenPOWER on IntegriCloud