Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Dec 2009 23:31: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: r200193 - head/tools/regression/bin/sh/parser
Message-ID:  <200912062331.nB6NVNDo035034@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sun Dec  6 23:31:23 2009
New Revision: 200193
URL: http://svn.freebsd.org/changeset/base/200193

Log:
  sh: Test ;<newline> as well as ; in the 'for' parser test.

Modified:
  head/tools/regression/bin/sh/parser/for1.0

Modified: head/tools/regression/bin/sh/parser/for1.0
==============================================================================
--- head/tools/regression/bin/sh/parser/for1.0	Sun Dec  6 23:28:49 2009	(r200192)
+++ head/tools/regression/bin/sh/parser/for1.0	Sun Dec  6 23:31:23 2009	(r200193)
@@ -4,7 +4,7 @@ nl='
 '
 list=' a b c'
 for s1 in "$nl" " "; do
-	for s2 in "$nl" ";"; do
+	for s2 in "$nl" ";" ";$nl"; do
 		for s3 in "$nl" " "; do
 			r=''
 			eval "for i${s1}in ${list}${s2}do${s3}r=\"\$r \$i\"; done"
@@ -13,7 +13,7 @@ for s1 in "$nl" " "; do
 	done
 done
 set -- $list
-for s2 in "$nl" " " ";"; do # s2=";" is an extension to POSIX
+for s2 in "$nl" " " ";" ";$nl"; do # s2=";" and ";$nl" are extensions to POSIX
 	for s3 in "$nl" " "; do
 		r=''
 		eval "for i${s2}do${s3}r=\"\$r \$i\"; done"
@@ -21,7 +21,7 @@ for s2 in "$nl" " " ";"; do # s2=";" is 
 	done
 done
 for s1 in "$nl" " "; do
-	for s2 in "$nl" ";"; do
+	for s2 in "$nl" ";" ";$nl"; do
 		for s3 in "$nl" " "; do
 			eval "for i${s1}in${s2}do${s3}exit 1; done"
 		done



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912062331.nB6NVNDo035034>