svn commit: r255065 - in stable/9: bin/sh tools/regression/bin/sh/parser
Jilles Tjoelker
jilles at FreeBSD.org
Fri Aug 30 10:07:11 UTC 2013
Author: jilles
Date: Fri Aug 30 10:07:10 2013
New Revision: 255065
URL: http://svnweb.freebsd.org/changeset/base/255065
Log:
MFC r254335: sh: Allow a lone redirection before '|', ';;' or ';&'.
Example: </dev/null | :
PR: 181240
Added:
stable/9/tools/regression/bin/sh/parser/only-redir2.0
- copied unchanged from r254335, head/tools/regression/bin/sh/parser/only-redir2.0
stable/9/tools/regression/bin/sh/parser/only-redir3.0
- copied unchanged from r254335, head/tools/regression/bin/sh/parser/only-redir3.0
stable/9/tools/regression/bin/sh/parser/only-redir4.0
- copied unchanged from r254335, head/tools/regression/bin/sh/parser/only-redir4.0
Modified:
stable/9/bin/sh/parser.c
Directory Properties:
stable/9/bin/sh/ (props changed)
stable/9/tools/regression/bin/sh/ (props changed)
Modified: stable/9/bin/sh/parser.c
==============================================================================
--- stable/9/bin/sh/parser.c Fri Aug 30 10:01:19 2013 (r255064)
+++ stable/9/bin/sh/parser.c Fri Aug 30 10:07:10 2013 (r255065)
@@ -576,6 +576,9 @@ TRACE(("expecting DO got %s %s\n", tokna
case TSEMI:
case TAND:
case TOR:
+ case TPIPE:
+ case TENDCASE:
+ case TFALLTHRU:
/*
* An empty command before a ; doesn't make much sense, and
* should certainly be disallowed in the case of `if ;'.
Copied: stable/9/tools/regression/bin/sh/parser/only-redir2.0 (from r254335, head/tools/regression/bin/sh/parser/only-redir2.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/tools/regression/bin/sh/parser/only-redir2.0 Fri Aug 30 10:07:10 2013 (r255065, copy of r254335, head/tools/regression/bin/sh/parser/only-redir2.0)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+</dev/null | :
Copied: stable/9/tools/regression/bin/sh/parser/only-redir3.0 (from r254335, head/tools/regression/bin/sh/parser/only-redir3.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/tools/regression/bin/sh/parser/only-redir3.0 Fri Aug 30 10:07:10 2013 (r255065, copy of r254335, head/tools/regression/bin/sh/parser/only-redir3.0)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+case x in x) </dev/null ;; esac
Copied: stable/9/tools/regression/bin/sh/parser/only-redir4.0 (from r254335, head/tools/regression/bin/sh/parser/only-redir4.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/tools/regression/bin/sh/parser/only-redir4.0 Fri Aug 30 10:07:10 2013 (r255065, copy of r254335, head/tools/regression/bin/sh/parser/only-redir4.0)
@@ -0,0 +1,2 @@
+# $FreeBSD$
+case x in x) </dev/null ;& esac
More information about the svn-src-stable-9
mailing list