From owner-svn-src-all@freebsd.org Sun Sep 13 14:24:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5DC3A037A7; Sun, 13 Sep 2015 14:24:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8702F1074; Sun, 13 Sep 2015 14:24:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DEOGnM093084; Sun, 13 Sep 2015 14:24:16 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DEODMh093070; Sun, 13 Sep 2015 14:24:13 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201509131424.t8DEODMh093070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 13 Sep 2015 14:24:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287755 - in stable/10/bin/sh/tests: expansion parameters parser X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2015 14:24:16 -0000 Author: jilles Date: Sun Sep 13 14:24:12 2015 New Revision: 287755 URL: https://svnweb.freebsd.org/changeset/base/287755 Log: MFC r268436,273243,278806,280920,286971: sh: Add various tests. These new tests from head pass with unmodified stable/10 sh. Added: stable/10/bin/sh/tests/expansion/ifs5.0 - copied unchanged from r278806, head/bin/sh/tests/expansion/ifs5.0 stable/10/bin/sh/tests/expansion/ifs6.0 - copied unchanged from r280920, head/bin/sh/tests/expansion/ifs6.0 stable/10/bin/sh/tests/expansion/ifs7.0 - copied unchanged from r280920, head/bin/sh/tests/expansion/ifs7.0 stable/10/bin/sh/tests/expansion/pathname5.0 - copied unchanged from r278806, head/bin/sh/tests/expansion/pathname5.0 stable/10/bin/sh/tests/parameters/positional3.0 - copied unchanged from r268436, head/bin/sh/tests/parameters/positional3.0 stable/10/bin/sh/tests/parser/dollar-quote12.0 - copied unchanged from r286971, head/bin/sh/tests/parser/dollar-quote12.0 stable/10/bin/sh/tests/parser/line-cont1.0 - copied unchanged from r273243, head/bin/sh/tests/parser/line-cont1.0 stable/10/bin/sh/tests/parser/line-cont2.0 - copied unchanged from r273243, head/bin/sh/tests/parser/line-cont2.0 stable/10/bin/sh/tests/parser/line-cont3.0 - copied unchanged from r273243, head/bin/sh/tests/parser/line-cont3.0 Modified: stable/10/bin/sh/tests/expansion/Makefile stable/10/bin/sh/tests/parameters/Makefile stable/10/bin/sh/tests/parser/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/tests/expansion/Makefile ============================================================================== --- stable/10/bin/sh/tests/expansion/Makefile Sun Sep 13 14:04:42 2015 (r287754) +++ stable/10/bin/sh/tests/expansion/Makefile Sun Sep 13 14:24:12 2015 (r287755) @@ -45,6 +45,9 @@ FILES+= ifs1.0 FILES+= ifs2.0 FILES+= ifs3.0 FILES+= ifs4.0 +FILES+= ifs5.0 +FILES+= ifs6.0 +FILES+= ifs7.0 FILES+= length1.0 FILES+= length2.0 FILES+= length3.0 @@ -59,6 +62,7 @@ FILES+= pathname1.0 FILES+= pathname2.0 FILES+= pathname3.0 FILES+= pathname4.0 +FILES+= pathname5.0 FILES+= plus-minus1.0 FILES+= plus-minus2.0 FILES+= plus-minus3.0 Copied: stable/10/bin/sh/tests/expansion/ifs5.0 (from r278806, head/bin/sh/tests/expansion/ifs5.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/expansion/ifs5.0 Sun Sep 13 14:24:12 2015 (r287755, copy of r278806, head/bin/sh/tests/expansion/ifs5.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +set -- $(echo a b c d) +[ "$#" = 4 ] Copied: stable/10/bin/sh/tests/expansion/ifs6.0 (from r280920, head/bin/sh/tests/expansion/ifs6.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/expansion/ifs6.0 Sun Sep 13 14:24:12 2015 (r287755, copy of r280920, head/bin/sh/tests/expansion/ifs6.0) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +IFS=': ' +x=': :' +set -- $x +[ "$#|$1|$2|$3" = "2|||" ] Copied: stable/10/bin/sh/tests/expansion/ifs7.0 (from r280920, head/bin/sh/tests/expansion/ifs7.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/expansion/ifs7.0 Sun Sep 13 14:24:12 2015 (r287755, copy of r280920, head/bin/sh/tests/expansion/ifs7.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +IFS=2 +set -- $((123)) +[ "$#|$1|$2|$3" = "2|1|3|" ] Copied: stable/10/bin/sh/tests/expansion/pathname5.0 (from r278806, head/bin/sh/tests/expansion/pathname5.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/expansion/pathname5.0 Sun Sep 13 14:24:12 2015 (r287755, copy of r278806, head/bin/sh/tests/expansion/pathname5.0) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +[ `echo '/[e]tc'` = /etc ] Modified: stable/10/bin/sh/tests/parameters/Makefile ============================================================================== --- stable/10/bin/sh/tests/parameters/Makefile Sun Sep 13 14:04:42 2015 (r287754) +++ stable/10/bin/sh/tests/parameters/Makefile Sun Sep 13 14:24:12 2015 (r287755) @@ -13,6 +13,7 @@ FILES+= optind1.0 FILES+= optind2.0 FILES+= positional1.0 FILES+= positional2.0 +FILES+= positional3.0 FILES+= positional5.0 FILES+= pwd1.0 FILES+= pwd2.0 Copied: stable/10/bin/sh/tests/parameters/positional3.0 (from r268436, head/bin/sh/tests/parameters/positional3.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/parameters/positional3.0 Sun Sep 13 14:24:12 2015 (r287755, copy of r268436, head/bin/sh/tests/parameters/positional3.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +r=$(${SH} -c 'echo ${01:+yes}${010:+yes}' '' a '' '' '' '' '' '' '' '' b) +[ "$r" = yesyes ] Modified: stable/10/bin/sh/tests/parser/Makefile ============================================================================== --- stable/10/bin/sh/tests/parser/Makefile Sun Sep 13 14:04:42 2015 (r287754) +++ stable/10/bin/sh/tests/parser/Makefile Sun Sep 13 14:24:12 2015 (r287755) @@ -34,6 +34,7 @@ FILES+= dollar-quote8.0 FILES+= dollar-quote9.0 FILES+= dollar-quote10.0 FILES+= dollar-quote11.0 +FILES+= dollar-quote12.0 FILES+= empty-braces1.0 FILES+= empty-cmd1.0 FILES+= for1.0 @@ -52,6 +53,9 @@ FILES+= heredoc8.0 FILES+= heredoc9.0 FILES+= heredoc10.0 FILES+= heredoc11.0 +FILES+= line-cont1.0 +FILES+= line-cont2.0 +FILES+= line-cont3.0 FILES+= no-space1.0 FILES+= no-space2.0 FILES+= only-redir1.0 Copied: stable/10/bin/sh/tests/parser/dollar-quote12.0 (from r286971, head/bin/sh/tests/parser/dollar-quote12.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/parser/dollar-quote12.0 Sun Sep 13 14:24:12 2015 (r287755, copy of r286971, head/bin/sh/tests/parser/dollar-quote12.0) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +# \u without any digits at all remains invalid. +# Our choice is a parse error. + +v=$( (eval ": \$'\u'") 2>&1 >/dev/null) +[ $? -ne 0 ] && [ -n "$v" ] Copied: stable/10/bin/sh/tests/parser/line-cont1.0 (from r273243, head/bin/sh/tests/parser/line-cont1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/parser/line-cont1.0 Sun Sep 13 14:24:12 2015 (r287755, copy of r273243, head/bin/sh/tests/parser/line-cont1.0) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +i\ +f +t\ +r\ +u\ +e +t\ +h\ +e\ +n +: +\ +f\ +i Copied: stable/10/bin/sh/tests/parser/line-cont2.0 (from r273243, head/bin/sh/tests/parser/line-cont2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/parser/line-cont2.0 Sun Sep 13 14:24:12 2015 (r287755, copy of r273243, head/bin/sh/tests/parser/line-cont2.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +[ "a\ +b" = ab ] Copied: stable/10/bin/sh/tests/parser/line-cont3.0 (from r273243, head/bin/sh/tests/parser/line-cont3.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/bin/sh/tests/parser/line-cont3.0 Sun Sep 13 14:24:12 2015 (r287755, copy of r273243, head/bin/sh/tests/parser/line-cont3.0) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +v=`printf %s 'a\ +b'` +w="`printf %s 'c\ +d'`" +[ "$v$w" = abcd ]