aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2018-02-23 13:04:31 +1300
committerAldo Cortesi <aldo@nullcube.com>2018-02-23 13:04:31 +1300
commitc471c42c7c2b26b4330c7780abe72cc8176580ab (patch)
tree4c468049153735dca4349764a126e3e7977d2472 /test
parent58ccad7576e5fd33e937aba58df2f9edc389e52e (diff)
downloadmitmproxy-c471c42c7c2b26b4330c7780abe72cc8176580ab.tar.gz
mitmproxy-c471c42c7c2b26b4330c7780abe72cc8176580ab.tar.bz2
mitmproxy-c471c42c7c2b26b4330c7780abe72cc8176580ab.zip
Fix an issue with quoting and commands
Previously, quotes would disappear during editing, making it impossible to enter command arguments with spaces.
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_command.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/mitmproxy/test_command.py b/test/mitmproxy/test_command.py
index c777192d..e2b80753 100644
--- a/test/mitmproxy/test_command.py
+++ b/test/mitmproxy/test_command.py
@@ -211,6 +211,22 @@ class TestCommand:
],
[]
],
+ [
+ "flow \"one two",
+ [
+ command.ParseResult(value = "flow", type = mitmproxy.types.Cmd, valid = True),
+ command.ParseResult(value = "\"one two", type = flow.Flow, valid = False),
+ ],
+ ["str"]
+ ],
+ [
+ "flow \"one two\"",
+ [
+ command.ParseResult(value = "flow", type = mitmproxy.types.Cmd, valid = True),
+ command.ParseResult(value = "one two", type = flow.Flow, valid = False),
+ ],
+ ["str"]
+ ],
]
with taddons.context() as tctx:
tctx.master.addons.add(TAddon())