diff options
Diffstat (limited to 'Lib/test/re_tests.py')
-rwxr-xr-x | Lib/test/re_tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/re_tests.py b/Lib/test/re_tests.py index d6f04f0..7ab8eb9 100755 --- a/Lib/test/re_tests.py +++ b/Lib/test/re_tests.py @@ -548,6 +548,13 @@ tests = [ ('a(?:b|(c|e){1,2}?|d)+?(.)', 'ace', SUCCEED, 'g1 + g2', 'ce'), ('^(.+)?B', 'AB', SUCCEED, 'g1', 'A'), + # lookbehind: split by : but not if it is escaped by -. + ('(?<!-):(.*?)(?<!-):', 'a:bc-:de:f', SUCCEED, 'g1', 'bc-:de' ), + # escaping with \ as we know it + ('(?<!\\\):(.*?)(?<!\\\):', 'a:bc\\:de:f', SUCCEED, 'g1', 'bc\\:de' ), + # terminating with ' and escaping with ? as in edifact + ("(?<!\\?)'(.*?)(?<!\\?)'", "a'bc?'de'f", SUCCEED, 'g1', "bc?'de" ), + # Comments using the (?#...) syntax ('w(?# comment', 'w', SYNTAX_ERROR), |