From e1877577bc058cfd0b9141b250595b38e95a6ecf Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 31 Aug 2017 02:14:22 +0200 Subject: make split_special_areas more flexible, refs #2537 (cherry picked from commit 31ef7f149e4553eb9403634c0eec6de4d0123386) --- test/mitmproxy/utils/test_strutils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/mitmproxy/utils/test_strutils.py b/test/mitmproxy/utils/test_strutils.py index 7ec72e4e..dfe2c620 100644 --- a/test/mitmproxy/utils/test_strutils.py +++ b/test/mitmproxy/utils/test_strutils.py @@ -99,8 +99,8 @@ def test_hexdump(): ESCAPE_QUOTES = [ - ("'", strutils.NO_ESCAPE + "'"), - ('"', strutils.NO_ESCAPE + '"') + "'" + strutils.SINGLELINE_CONTENT + strutils.NO_ESCAPE + "'", + '"' + strutils.SINGLELINE_CONTENT + strutils.NO_ESCAPE + '"' ] @@ -113,11 +113,11 @@ def test_split_special_areas(): ) == ["foo ", "'b\\'a\"r'", " baz"] assert strutils.split_special_areas( "foo\n/*bar\nbaz*/\nqux", - [(r'/\*', r'\*/')] + [r'/\*[\s\S]+?\*/'] ) == ["foo\n", "/*bar\nbaz*/", "\nqux"] assert strutils.split_special_areas( "foo\n//bar\nbaz", - [(r'//', r'$')] + [r'//.+$'] ) == ["foo\n", "//bar", "\nbaz"] -- cgit v1.2.3