sh: Don't have [ match any [[:class:]]
Submitted by: Robert Elz MFC after: 3 days
This commit is contained in:
parent
a7163bb962
commit
4d7f36eea5
@ -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++;
|
||||
|
@ -42,6 +42,7 @@ ${PACKAGE}FILES+= case19.0
|
||||
${PACKAGE}FILES+= case20.0
|
||||
${PACKAGE}FILES+= case21.0
|
||||
${PACKAGE}FILES+= case22.0
|
||||
${PACKAGE}FILES+= case23.0
|
||||
${PACKAGE}FILES+= cd1.0
|
||||
${PACKAGE}FILES+= cd2.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