summary refs log tree commit diff
path: root/bin/1sh/tests/builtins/read3.0
diff options
context:
space:
mode:
Diffstat (limited to 'bin/1sh/tests/builtins/read3.0')
-rw-r--r--bin/1sh/tests/builtins/read3.011
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/1sh/tests/builtins/read3.0 b/bin/1sh/tests/builtins/read3.0
new file mode 100644
index 00000000..84dec7cb
--- /dev/null
+++ b/bin/1sh/tests/builtins/read3.0
@@ -0,0 +1,11 @@
+# $FreeBSD: releng/12.1/bin/sh/tests/builtins/read3.0 212330 2010-09-08 18:32:23Z jilles $
+
+printf '%s\n' 'a\ b c'	| { read a b; printf '%s\n' "x${a}x${b}x"; }
+printf '%s\n' 'a b\ c'	| { read a b; printf '%s\n' "x${a}x${b}x"; }
+printf '%s\n' 'a\:b:c'	| { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; }
+printf '%s\n' 'a:b\:c'	| { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; }
+printf '%s\n' '\ a'	| { read a b; printf '%s\n' "x${a}x${b}x"; }
+printf '%s\n' '\:a'	| { IFS=: read a b; printf '%s\n' "x${a}x${b}x"; }
+printf '%s\n' '\\'	| { read a b; printf '%s\n' "x${a}x${b}x"; }
+printf '%s\n' '\\\ a'	| { read a b; printf '%s\n' "x${a}x${b}x"; }
+printf '%s\n' '\\\ a'	| { read -r a b; printf '%s\n' "x${a}x${b}x"; }