diff options
| author | Maximilian Hils <git@maximilianhils.com> | 2016-05-25 20:11:34 -0700 |
|---|---|---|
| committer | Maximilian Hils <git@maximilianhils.com> | 2016-05-25 20:11:34 -0700 |
| commit | d3477e27fa4ffbcfa9c1b9aa937d1d54448cc597 (patch) | |
| tree | 37e4eb1be1c0887279192c61487bb3079ae458c1 /test | |
| parent | 7a8da48a306dfc8e43239d7f2a141c465e40ab77 (diff) | |
| download | mitmproxy-d3477e27fa4ffbcfa9c1b9aa937d1d54448cc597.tar.gz mitmproxy-d3477e27fa4ffbcfa9c1b9aa937d1d54448cc597.tar.bz2 mitmproxy-d3477e27fa4ffbcfa9c1b9aa937d1d54448cc597.zip | |
bytes_to_escaped_str: always escape single quotes
Diffstat (limited to 'test')
| -rw-r--r-- | test/netlib/test_utils.py | 2 | ||||
| -rw-r--r-- | test/pathod/test_language_base.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/test/netlib/test_utils.py b/test/netlib/test_utils.py index 671ae66c..fce1d0a7 100644 --- a/test/netlib/test_utils.py +++ b/test/netlib/test_utils.py @@ -178,6 +178,8 @@ def test_bytes_to_escaped_str(): assert utils.bytes_to_escaped_str(b"\b") == r"\x08" assert utils.bytes_to_escaped_str(br"&!?=\)") == r"&!?=\\)" assert utils.bytes_to_escaped_str(b'\xc3\xbc') == r"\xc3\xbc" + assert utils.bytes_to_escaped_str(b"'") == r"\'" + assert utils.bytes_to_escaped_str(b'"') == r'"' def test_escaped_str_to_bytes(): diff --git a/test/pathod/test_language_base.py b/test/pathod/test_language_base.py index 64d4af1f..2e5d9041 100644 --- a/test/pathod/test_language_base.py +++ b/test/pathod/test_language_base.py @@ -67,7 +67,7 @@ class TestTokValueLiteral: def test_roundtrip(self): self.roundtrip("'") - self.roundtrip('\'') + self.roundtrip(r"\'") self.roundtrip("a") self.roundtrip("\"") # self.roundtrip("\\") |
