svn commit: r286971 - head/bin/sh/tests/parser

Jilles Tjoelker jilles at FreeBSD.org
Thu Aug 20 21:31:38 UTC 2015


Author: jilles
Date: Thu Aug 20 21:31:36 2015
New Revision: 286971
URL: https://svnweb.freebsd.org/changeset/base/286971

Log:
  sh: Add test for $'\u' without any digits.
  
  It is likely that $'\uXXXX' and $'\UXXXXXXXX' will allow fewer digits in
  future. However, no digits at all should still be disallowed.

Added:
  head/bin/sh/tests/parser/dollar-quote12.0   (contents, props changed)
Modified:
  head/bin/sh/tests/parser/Makefile

Modified: head/bin/sh/tests/parser/Makefile
==============================================================================
--- head/bin/sh/tests/parser/Makefile	Thu Aug 20 20:28:51 2015	(r286970)
+++ head/bin/sh/tests/parser/Makefile	Thu Aug 20 21:31:36 2015	(r286971)
@@ -36,6 +36,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

Added: head/bin/sh/tests/parser/dollar-quote12.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/bin/sh/tests/parser/dollar-quote12.0	Thu Aug 20 21:31:36 2015	(r286971)
@@ -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" ]


More information about the svn-src-head mailing list