svn commit: r333224 - in stable/11/bin/sh: . tests/builtins
Jilles Tjoelker
jilles at FreeBSD.org
Thu May 3 19:47:26 UTC 2018
Author: jilles
Date: Thu May 3 19:47:25 2018
New Revision: 333224
URL: https://svnweb.freebsd.org/changeset/base/333224
Log:
MFC r333092: sh: Don't have [ match any [[:class:]]
Added:
stable/11/bin/sh/tests/builtins/case23.0
- copied unchanged from r333092, head/bin/sh/tests/builtins/case23.0
Modified:
stable/11/bin/sh/expand.c
stable/11/bin/sh/tests/builtins/Makefile
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/bin/sh/expand.c
==============================================================================
--- stable/11/bin/sh/expand.c Thu May 3 19:45:48 2018 (r333223)
+++ stable/11/bin/sh/expand.c Thu May 3 19:47:25 2018 (r333224)
@@ -1342,8 +1342,10 @@ patmatch(const char *pattern, const char *string)
}
if (c == '[' && *p == ':') {
found |= match_charclass(p, chr, &end);
- if (end != NULL)
+ if (end != NULL) {
p = end;
+ continue;
+ }
}
if (c == CTLESC)
c = *p++;
Modified: stable/11/bin/sh/tests/builtins/Makefile
==============================================================================
--- stable/11/bin/sh/tests/builtins/Makefile Thu May 3 19:45:48 2018 (r333223)
+++ stable/11/bin/sh/tests/builtins/Makefile Thu May 3 19:47:25 2018 (r333224)
@@ -40,6 +40,7 @@ ${PACKAGE}FILES+= case17.0
${PACKAGE}FILES+= case18.0
${PACKAGE}FILES+= case19.0
${PACKAGE}FILES+= case20.0
+${PACKAGE}FILES+= case23.0
${PACKAGE}FILES+= cd1.0
${PACKAGE}FILES+= cd2.0
${PACKAGE}FILES+= cd3.0
Copied: stable/11/bin/sh/tests/builtins/case23.0 (from r333092, head/bin/sh/tests/builtins/case23.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/11/bin/sh/tests/builtins/case23.0 Thu May 3 19:47:25 2018 (r333224, copy of r333092, head/bin/sh/tests/builtins/case23.0)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+case [ in
+[[:alpha:]]) echo bad
+esac
More information about the svn-src-stable
mailing list