Mercurial > hgrepos > Python > libs > ConfigMix
diff tests/test.py @ 659:b97e5f3bbc8e
Test indexed list access in variable interpolations: ok.
Also drop an extra note into the documentation.
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Mon, 30 May 2022 14:08:40 +0200 |
| parents | 213f0ec3bbbc |
| children | 9f0842a942b2 |
line wrap: on
line diff
--- a/tests/test.py Mon May 30 13:23:53 2022 +0200 +++ b/tests/test.py Mon May 30 14:08:40 2022 +0200 @@ -981,6 +981,12 @@ 2, cfg.getvar_s(u"the-list.~%d~.entry" % (-1, ))) + def test53_expand_an_indexed_substitution(self): + cfg = self._load(os.path.join(TESTDATADIR, + "index-access-for-jails.yml")) + self.assertEqual(1, cfg.getvar_s(u"expand-me")) + self.assertEqual(2, cfg.getvar_s(u"expand-me-2")) + class T02LoadAndMerge(_T02MixinLoadAndMerge, unittest.TestCase):
