Corresponding output.

This commit is contained in:
Guido van Rossum 1997-07-17 22:37:07 +00:00
parent 06c0ec94e4
commit 32d6f3c0ce

View file

@ -214,6 +214,7 @@ test_re
('(a)b(c)', 'abc', 0, 'found+"-"+g1+"-"+g2', 'abc-a-c')
('a+b+c', 'aabbabc', 0, 'found', 'abc')
('a{1,}b{1,}c', 'aabbabc', 0, 'found', 'abc')
('a**', '-', 2)
('a.+?c', 'abcabc', 0, 'found', 'abc')
('(a+|b)*', 'ab', 0, 'found+"-"+g1', 'ab-b')
('(a+|b){0,}', 'ab', 0, 'found+"-"+g1', 'ab-b')
@ -255,6 +256,7 @@ test_re
('(bc+d$|ef*g.|h?i(j|k))', 'reffgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None')
('((((((((((a))))))))))', 'a', 0, 'g10', 'a')
('((((((((((a))))))))))\\10', 'aa', 0, 'found', 'aa')
('((((((((((a))))))))))\\41', '', 2)
('(((((((((a)))))))))', 'a', 0, 'found', 'a')
('multiple words of text', 'uh-uh', 1)
('multiple words', 'multiple words, yeah', 0, 'found', 'multiple words')
@ -336,6 +338,7 @@ test_re
('(?i)(a)b(c)', 'ABC', 0, 'found+"-"+g1+"-"+g2', 'ABC-A-C')
('(?i)a+b+c', 'AABBABC', 0, 'found', 'ABC')
('(?i)a{1,}b{1,}c', 'AABBABC', 0, 'found', 'ABC')
('(?i)a**', '-', 2)
('(?i)a.+?c', 'ABCABC', 0, 'found', 'ABC')
('(?i)a.*?c', 'ABCABC', 0, 'found', 'ABC')
('(?i)a.{0,5}?c', 'ABCABC', 0, 'found', 'ABC')
@ -380,6 +383,7 @@ test_re
('(?i)(bc+d$|ef*g.|h?i(j|k))', 'REFFGZ', 0, 'found+"-"+g1+"-"+g2', 'EFFGZ-EFFGZ-None')
('(?i)((((((((((a))))))))))', 'A', 0, 'g10', 'A')
('(?i)((((((((((a))))))))))\\10', 'AA', 0, 'found', 'AA')
('(?i)((((((((((a))))))))))\\41', '', 2)
('(?i)(((((((((a)))))))))', 'A', 0, 'found', 'A')
('(?i)(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))', 'A', 0, 'g1', 'A')
('(?i)(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))', 'C', 0, 'g1', 'C')
@ -398,8 +402,14 @@ test_re
('^(.+)?B', 'AB', 0, 'g1', 'A')
('w(?# comment', 'w', 2)
('w(?# comment 1)xy(?# comment 2)z', 'wxyz', 0, 'found', 'wxyz')
('w# comment 1\012 x(?x) y\012\011# comment 2\012\011z', 'wxyz', 0, 'found', 'wxyz')
('w(?i)', 'W', 2)
('(?x)w# comment 1\012 x y\012\011# comment 2\012\011z', 'wxyz', 0, 'found', 'wxyz')
('^abc', 'jkl\012abc\012xyz', 1)
('(?m)^abc', 'jkl\012abc\012xyz', 0, 'found', 'abc')
('(?m)abc$', 'jkl\012xyzabc\012123', 0, 'found', 'abc')
('a.b', 'a\012b', 1)
('(?s)a.b', 'a\012b', 0, 'found', 'a\012b')
('\\w+', '--ab_cd0123--', 0, 'found', 'ab_cd0123')
('\\D+', '1234abc5678', 0, 'found', 'abc')
('[\\da-fA-F]+', '123abc', 0, 'found', '123abc')
('[\\d-x]', '-', 2)