Author: jilles
Date: Wed Sep  8 18:32:23 2010
New Revision: 212330
URL: http://svn.freebsd.org/changeset/base/212330

Log:
  sh: Add simple tests for backslashes in the read builtin.

Added:
  head/tools/regression/bin/sh/builtins/read3.0   (contents, props changed)
  head/tools/regression/bin/sh/builtins/read3.0.stdout   (contents, props 
changed)

Added: head/tools/regression/bin/sh/builtins/read3.0
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/read3.0       Wed Sep  8 18:32:23 
2010        (r212330)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+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"; }

Added: head/tools/regression/bin/sh/builtins/read3.0.stdout
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/read3.0.stdout        Wed Sep  8 
18:32:23 2010        (r212330)
@@ -0,0 +1,9 @@
+xa bxcx
+xaxb cx
+xa:bxcx
+xaxb:cx
+x axx
+x:axx
+x\xx
+x\ axx
+x\\\xax
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to