From fcc2506142ce6b0b3df29586c8f9ad6ac2a014b8 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 26 Dec 2015 16:22:49 +1100 Subject: Add test for double substitution using {{ }} {{foo}} uses the result of {foo} as the name for substitution. --- tests/test_config.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_config.py b/tests/test_config.py index 6176641..a027e91 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1006,6 +1006,20 @@ class TestConfigTestEnv: argv = conf.commands assert argv[0] == ["echo"] + def test_substitution_double(self, newconfig): + inisource = """ + [params] + foo = bah + foo2 = [params]foo + + [testenv:py27] + commands = + echo {{[params]foo2}} + """ + conf = newconfig([], inisource).envconfigs['py27'] + argv = conf.commands + assert argv[0] == ['echo', 'bah'] + def test_posargs_backslashed_or_quoted(self, tmpdir, newconfig): inisource = """ [testenv:py27] -- cgit v1.2.1