summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_re.py
diff options
context:
space:
mode:
authorGustavo Niemeyer <gustavo@niemeyer.net>2005-09-14 08:54:39 (GMT)
committerGustavo Niemeyer <gustavo@niemeyer.net>2005-09-14 08:54:39 (GMT)
commit6fa0c5a452ea935977b283955a1d49e5e23d97dc (patch)
tree2a192ec77d57f5f9e6be0e742fbcd4dc70a98005 /Lib/test/test_re.py
parent0c55f2946b559bd5f6dec457accdc2f2c9c55d3a (diff)
downloadcpython-6fa0c5a452ea935977b283955a1d49e5e23d97dc.zip
cpython-6fa0c5a452ea935977b283955a1d49e5e23d97dc.tar.gz
cpython-6fa0c5a452ea935977b283955a1d49e5e23d97dc.tar.bz2
Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than
considering it exactly like a '*'.
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r--Lib/test/test_re.py3
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)