Issue #20998: Fixed re.fullmatch() of repeated single character pattern

with ignore case.  Original patch by Matthew Barnett.
This commit is contained in:
Serhiy Storchaka 2014-05-14 21:48:17 +03:00
parent 946cfc3e23
commit 429b59ec69
5 changed files with 25 additions and 19 deletions

View file

@ -1223,6 +1223,11 @@ class ReTests(unittest.TestCase):
pat.scanner(string='abracadabra', pos=3, endpos=10).search().span(),
(7, 9))
def test_bug_20998(self):
# Issue #20998: Fullmatch of repeated single character pattern
# with ignore case.
self.assertEqual(re.fullmatch('[a-c]+', 'ABC', re.I).span(), (0, 3))
class PatternReprTests(unittest.TestCase):
def check(self, pattern, expected):