Skip to content

Commit

Permalink
Fix invalid escape sequences in test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Crozzers committed Feb 17, 2024
1 parent 08b1b37 commit 8ecbe89
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 16 deletions.
7 changes: 3 additions & 4 deletions test/tm-cases/link_patterns.opts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{"extras": ["link-patterns"],
"link_patterns": [
(re.compile("recipe\s+(\d+)", re.I), r"http://code.activestate.com/recipes/\1/"),
(re.compile("(?:komodo\s+)?bug\s+(\d+)", re.I), r"http://bugs.activestate.com/show_bug.cgi?id=\1"),
(re.compile("PEP\s+(\d+)", re.I), lambda m: "http://www.python.org/dev/peps/pep-%04d/" % int(m.group(1))),
(re.compile(r"recipe\s+(\d+)", re.I), r"http://code.activestate.com/recipes/\1/"),
(re.compile(r"(?:komodo\s+)?bug\s+(\d+)", re.I), r"http://bugs.activestate.com/show_bug.cgi?id=\1"),
(re.compile(r"PEP\s+(\d+)", re.I), lambda m: "http://www.python.org/dev/peps/pep-%04d/" % int(m.group(1))),
],
}

3 changes: 1 addition & 2 deletions test/tm-cases/link_patterns_double_hit.opts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{"extras": ["link-patterns"],
"link_patterns": [
(re.compile(r'mozilla\s+bug\s+(\d+)', re.I), r'http://bugzilla.mozilla.org/show_bug.cgi?id=\1'),
(re.compile("(?:komodo\s+)?bug\s+(\d+)", re.I), r"http://bugs.activestate.com/show_bug.cgi?id=\1"),
(re.compile(r"(?:komodo\s+)?bug\s+(\d+)", re.I), r"http://bugs.activestate.com/show_bug.cgi?id=\1"),
],
}

3 changes: 1 addition & 2 deletions test/tm-cases/link_patterns_edge_cases.opts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{"extras": ["link-patterns"],
"link_patterns": [
(re.compile("Blah\s+(\d+)", re.I), r"http://foo.com/blah_blah_blah/\1"),
(re.compile(r"Blah\s+(\d+)", re.I), r"http://foo.com/blah_blah_blah/\1"),
(re.compile("#([1-9][0-9]*)"), r"http://localhost/issue/\1"),
],
}

7 changes: 3 additions & 4 deletions test/tm-cases/link_patterns_escape.opts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{"extras": ["link-patterns"],
"link_patterns": [
(re.compile("recipe\s+(\d+)", re.I), r"http://code.activestate.com/recipes/\1/"),
(re.compile("(?:komodo\s+)?bug\s+(\d+)", re.I), r"http://bugs.activestate.com/show_bug.cgi?id=\1"),
(re.compile("PEP\s+(\d+)", re.I), lambda m: "http://www.python.org/dev/peps/pep-%04d/" % int(m.group(1))),
(re.compile(r"recipe\s+(\d+)", re.I), r"http://code.activestate.com/recipes/\1/"),
(re.compile(r"(?:komodo\s+)?bug\s+(\d+)", re.I), r"http://bugs.activestate.com/show_bug.cgi?id=\1"),
(re.compile(r"PEP\s+(\d+)", re.I), lambda m: "http://www.python.org/dev/peps/pep-%04d/" % int(m.group(1))),
],
}

4 changes: 2 additions & 2 deletions test/tm-cases/link_patterns_hash_matching_issue287.opts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{"extras": ["link-patterns"],
"link_patterns": [
(re.compile("#(\d+)", re.I), r"https://github.com/pyfa-org/Pyfa/issues/\1"),
(re.compile("@(\w+)", re.I), r"https://github.com/\1"),
(re.compile(r"#(\d+)", re.I), r"https://github.com/pyfa-org/Pyfa/issues/\1"),
(re.compile(r"@(\w+)", re.I), r"https://github.com/\1"),
(re.compile("([0-9a-f]{6,40})", re.I), r"https://github.com/pyfa-org/Pyfa/commit/\1")
]
}
4 changes: 2 additions & 2 deletions test/tm-cases/link_patterns_markdown_syntax.opts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{"extras": ["link-patterns"],
"link_patterns": [
(re.compile("recipe\s+(\d+)", re.I), r"http://code.activestate.com/recipes/\1/"),
(re.compile(r"recipe\s+(\d+)", re.I), r"http://code.activestate.com/recipes/\1/"),
],
}
}

0 comments on commit 8ecbe89

Please sign in to comment.