aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/utils/test_strutils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/mitmproxy/utils/test_strutils.py b/test/mitmproxy/utils/test_strutils.py
index 1372d31f..1fb4949f 100644
--- a/test/mitmproxy/utils/test_strutils.py
+++ b/test/mitmproxy/utils/test_strutils.py
@@ -19,6 +19,11 @@ def test_always_str():
assert strutils.always_str(None) is None
+def test_replace_surrogates():
+ assert strutils.replace_surrogates("foo") == "foo"
+ assert strutils.replace_surrogates("bar \udc80 baz") == "bar � baz"
+
+
def test_escape_control_characters():
assert strutils.escape_control_characters(u"one") == u"one"
assert strutils.escape_control_characters(u"\00ne") == u".ne"