from the really-stupid-bug department: uppercase literals should match

uppercase strings also when the IGNORECASE flag is set (bug #128899)

(also added test cases for recently fixed bugs to the regression suite
-- or in other words, check in re_tests.py too...)
This commit is contained in:
Fredrik Lundh 2001-01-15 18:28:14 +00:00
parent 48450cf0a9
commit 2e24044f9d
2 changed files with 19 additions and 6 deletions

View file

@ -23,9 +23,10 @@ def _compile(code, pattern, flags):
if op in (LITERAL, NOT_LITERAL):
if flags & SRE_FLAG_IGNORECASE:
emit(OPCODES[OP_IGNORE[op]])
emit(_sre.getlower(av, flags))
else:
emit(OPCODES[op])
emit(av)
emit(av)
elif op is IN:
if flags & SRE_FLAG_IGNORECASE:
emit(OPCODES[OP_IGNORE[op]])