sh: Don't have [ match any [[:class:]]
Submitted by: Robert Elz MFC after: 3 days
This commit is contained in:
parent
a7163bb962
commit
4d7f36eea5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333092
@ -1342,8 +1342,10 @@ patmatch(const char *pattern, const char *string)
|
|||||||
}
|
}
|
||||||
if (c == '[' && *p == ':') {
|
if (c == '[' && *p == ':') {
|
||||||
found |= match_charclass(p, chr, &end);
|
found |= match_charclass(p, chr, &end);
|
||||||
if (end != NULL)
|
if (end != NULL) {
|
||||||
p = end;
|
p = end;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (c == CTLESC)
|
if (c == CTLESC)
|
||||||
c = *p++;
|
c = *p++;
|
||||||
|
@ -42,6 +42,7 @@ ${PACKAGE}FILES+= case19.0
|
|||||||
${PACKAGE}FILES+= case20.0
|
${PACKAGE}FILES+= case20.0
|
||||||
${PACKAGE}FILES+= case21.0
|
${PACKAGE}FILES+= case21.0
|
||||||
${PACKAGE}FILES+= case22.0
|
${PACKAGE}FILES+= case22.0
|
||||||
|
${PACKAGE}FILES+= case23.0
|
||||||
${PACKAGE}FILES+= cd1.0
|
${PACKAGE}FILES+= cd1.0
|
||||||
${PACKAGE}FILES+= cd2.0
|
${PACKAGE}FILES+= cd2.0
|
||||||
${PACKAGE}FILES+= cd3.0
|
${PACKAGE}FILES+= cd3.0
|
||||||
|
5
bin/sh/tests/builtins/case23.0
Normal file
5
bin/sh/tests/builtins/case23.0
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
case [ in
|
||||||
|
[[:alpha:]]) echo bad
|
||||||
|
esac
|
Loading…
Reference in New Issue
Block a user