Skip to content

Commit

Permalink
tests: Modify regex test to expose too broad replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
jplitza committed Jan 4, 2022
1 parent beab328 commit abdef4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ def test_column(line, columns, expected):
"line,regex,expected,replace",
[
(
'3.3.3.3 - - [20/May/2015:21:05:01 +0000] "GET / HTTP/1.1" 200 13358 "-" "useragent"',
'3.3.3.3 - - [20/May/2015:21:05:01 +0000] "GET /723.3.3.357 HTTP/1.1" 200 13358 "-" "useragent"',
re.compile(
r"(?:^([^,]+) - - |.* - somefixedstring: ([^,]+) - .* - ([^,]+))"
),
'3.3.0.0 - - [20/May/2015:21:05:01 +0000] "GET / HTTP/1.1" 200 13358 "-" "useragent"',
'3.3.0.0 - - [20/May/2015:21:05:01 +0000] "GET /723.3.3.357 HTTP/1.1" 200 13358 "-" "useragent"',
None,
),
(
Expand Down

0 comments on commit abdef4c

Please sign in to comment.