diff options
author | Georg Brandl <georg@python.org> | 2005-09-18 13:03:16 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2005-09-18 13:03:16 (GMT) |
commit | 539604146aa5e33a5a1517f1a5fb4548153d77ef (patch) | |
tree | f58aa63f7d08b156a2e5eee5ef0f1bcc5d860283 /Lib/test/test_re.py | |
parent | 91926ad477ee8ddf57020f181a2aa72b7de8cb49 (diff) | |
download | cpython-539604146aa5e33a5a1517f1a5fb4548153d77ef.zip cpython-539604146aa5e33a5a1517f1a5fb4548153d77ef.tar.gz cpython-539604146aa5e33a5a1517f1a5fb4548153d77ef.tar.bz2 |
Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than
considering it exactly like a '*'.
Backport from 2.5 branch.
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r-- | Lib/test/test_re.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index eab995d..9755005 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -297,6 +297,9 @@ class ReTests(unittest.TestCase): self.assertNotEqual(re.match("^x{1,4}?$", "xxx"), None) self.assertNotEqual(re.match("^x{3,4}?$", "xxx"), None) + self.assertEqual(re.match("^x{}$", "xxx"), None) + self.assertNotEqual(re.match("^x{}$", "x{}"), None) + def test_getattr(self): self.assertEqual(re.match("(a)", "a").pos, 0) self.assertEqual(re.match("(a)", "a").endpos, 1) |