Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
cpython
Commits
bb184414
Commit
bb184414
authored
22 years ago
by
Neal Norwitz
Browse files
Options
Download
Email Patches
Plain Diff
SF patch #682432, add lookbehind tests
parent
88f115b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Lib/test/re_tests.py
Lib/test/re_tests.py
+7
-0
No files found.
Lib/test/re_tests.py
View file @
bb184414
...
...
@@ -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
),
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment