Date: Wed, 8 Sep 2010 18:32:23 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r212330 - head/tools/regression/bin/sh/builtins Message-ID: <201009081832.o88IWNQR060114@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009081832.o88IWNQR060114>