M-x untabify

This commit is contained in:
Michael W. Hudson 2005-06-03 13:55:58 +00:00
parent f8f937f211
commit e7fa1af85b
1 changed files with 9 additions and 9 deletions

View File

@ -235,15 +235,15 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.match('^(?:(a)|c)((?(1)|d))$', 'a').groups(), self.assertEqual(re.match('^(?:(a)|c)((?(1)|d))$', 'a').groups(),
('a', '')) ('a', ''))
# Tests for bug #1177831: exercise groups other than the first group # Tests for bug #1177831: exercise groups other than the first group
p = re.compile('(?P<g1>a)(?P<g2>b)?((?(g2)c|d))') p = re.compile('(?P<g1>a)(?P<g2>b)?((?(g2)c|d))')
self.assertEqual(p.match('abc').groups(), self.assertEqual(p.match('abc').groups(),
('a', 'b', 'c')) ('a', 'b', 'c'))
self.assertEqual(p.match('ad').groups(), self.assertEqual(p.match('ad').groups(),
('a', None, 'd')) ('a', None, 'd'))
self.assertEqual(p.match('abd'), None) self.assertEqual(p.match('abd'), None)
self.assertEqual(p.match('ac'), None) self.assertEqual(p.match('ac'), None)
def test_re_groupref(self): def test_re_groupref(self):
self.assertEqual(re.match(r'^(\|)?([^()]+)\1$', '|a|').groups(), self.assertEqual(re.match(r'^(\|)?([^()]+)\1$', '|a|').groups(),