Date: Thu, 23 Sep 2010 20:49:33 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r213086 - stable/8/tools/regression/bin/sh/builtins Message-ID: <201009232049.o8NKnXhd080146@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Thu Sep 23 20:49:33 2010 New Revision: 213086 URL: http://svn.freebsd.org/changeset/base/213086 Log: MFC r212330: sh: Add simple tests for backslashes in the read builtin. Added: stable/8/tools/regression/bin/sh/builtins/read3.0 - copied unchanged from r212330, head/tools/regression/bin/sh/builtins/read3.0 stable/8/tools/regression/bin/sh/builtins/read3.0.stdout - copied unchanged from r212330, head/tools/regression/bin/sh/builtins/read3.0.stdout Modified: Directory Properties: stable/8/tools/regression/bin/sh/ (props changed) Copied: stable/8/tools/regression/bin/sh/builtins/read3.0 (from r212330, head/tools/regression/bin/sh/builtins/read3.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/read3.0 Thu Sep 23 20:49:33 2010 (r213086, copy of r212330, head/tools/regression/bin/sh/builtins/read3.0) @@ -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"; } Copied: stable/8/tools/regression/bin/sh/builtins/read3.0.stdout (from r212330, head/tools/regression/bin/sh/builtins/read3.0.stdout) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/builtins/read3.0.stdout Thu Sep 23 20:49:33 2010 (r213086, copy of r212330, head/tools/regression/bin/sh/builtins/read3.0.stdout) @@ -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?201009232049.o8NKnXhd080146>