summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2015-11-20 22:36:39 +0100
committerholger krekel <holger@merlinux.eu>2015-11-20 22:36:39 +0100
commit4934b5fdd8e5517b1dc781bd6590d61d0d5b395b (patch)
tree2fe3ed860078642febb2691700153d67cce0cc16 /tests
parent29861cd9565db7f47d6e40e1245c12c2744e6bcf (diff)
parent65e64d4e24af25e0df927aa88ef427e6c2333f50 (diff)
downloadtox-4934b5fdd8e5517b1dc781bd6590d61d0d5b395b.tar.gz
merge default
Diffstat (limited to 'tests')
-rw-r--r--tests/test_config.py28
1 files changed, 24 insertions, 4 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index 9ba2baa..462e33c 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -450,7 +450,7 @@ class TestIniParser:
config = newconfig("""
[section]
key2=
- cmd1 {item1} \ # a comment
+ cmd1 {item1} \
{item2}
""")
reader = SectionReader("section", config._cfg)
@@ -465,12 +465,32 @@ class TestIniParser:
config = newconfig("""
[section]
key1=
- cmd1 'with space' \ # a comment
- 'after the comment'
+ cmd1 'part one' \
+ 'part two'
""")
reader = SectionReader("section", config._cfg)
x = reader.getargvlist("key1")
- assert x == [["cmd1", "with space", "after the comment"]]
+ assert x == [["cmd1", "part one", "part two"]]
+
+ def test_argvlist_comment_after_command(self, tmpdir, newconfig):
+ config = newconfig("""
+ [section]
+ key1=
+ cmd1 --flag # run the flag on the command
+ """)
+ reader = SectionReader("section", config._cfg)
+ x = reader.getargvlist("key1")
+ assert x == [["cmd1", "--flag"]]
+
+ def test_argvlist_command_contains_hash(self, tmpdir, newconfig):
+ config = newconfig("""
+ [section]
+ key1=
+ cmd1 --re "use the # symbol for an arg"
+ """)
+ reader = SectionReader("section", config._cfg)
+ x = reader.getargvlist("key1")
+ assert x == [["cmd1", "--re", "use the # symbol for an arg"]]
def test_argvlist_positional_substitution(self, tmpdir, newconfig):
config = newconfig("""