aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorHenrique <typoon@gmail.com>2019-11-17 11:26:20 -0500
committerHenrique <typoon@gmail.com>2019-11-17 11:26:20 -0500
commit8b52ea248e690df0d9892e9c5d9f88eda2486275 (patch)
tree414e44b5f8073843d73cbd8896400e897fab42ea /test
parent39a6d4860ce48e4663a7aa91651dbea639e93e96 (diff)
downloadmitmproxy-8b52ea248e690df0d9892e9c5d9f88eda2486275.tar.gz
mitmproxy-8b52ea248e690df0d9892e9c5d9f88eda2486275.tar.bz2
mitmproxy-8b52ea248e690df0d9892e9c5d9f88eda2486275.zip
Added coverage for the changes made
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_command.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/mitmproxy/test_command.py b/test/mitmproxy/test_command.py
index f5a641a8..eb3857bf 100644
--- a/test/mitmproxy/test_command.py
+++ b/test/mitmproxy/test_command.py
@@ -367,6 +367,8 @@ def test_simple():
c.add("one.two", a.cmd1)
assert(c.commands["one.two"].help == "cmd1 help")
assert(c.execute("one.two foo") == "ret foo")
+ assert(c.execute("one.two \"foo\"") == "ret foo")
+ assert(c.execute("one.two \"foo bar\"") == "ret \"foo bar\"")
assert(c.call("one.two", "foo") == "ret foo")
with pytest.raises(exceptions.CommandError, match="Unknown"):
c.execute("nonexistent")
@@ -382,6 +384,8 @@ def test_simple():
c.execute(r"\'")
with pytest.raises(exceptions.CommandError, match="Unknown"):
c.execute(r"\"")
+ with pytest.raises(exceptions.CommandError, match="Unknown"):
+ c.execute(r"\"")
c.add("empty", a.empty)
c.execute("empty")