# HG changeset patch # User Franz Glasner # Date 1620494375 -7200 # Node ID 176e22110fc5991d12216d444f61c6c468183942 # Parent ebd662a8376e902e357841cc75dc27ed6954b67b docs, tests: notes and additional tests when quoting the "ref" namespace name diff -r ebd662a8376e -r 176e22110fc5 docs/introduction.rst --- a/docs/introduction.rst Sat May 08 18:55:39 2021 +0200 +++ b/docs/introduction.rst Sat May 08 19:19:35 2021 +0200 @@ -452,6 +452,7 @@ With ``{{ref:my.other.key}}`` - special namespace ``ref`` +- can not be quoted currently in variable interpolation syntax - No special handling when merging is done - Keys within :meth:`.Configuration.getvar_s()` and :py:meth:`.Configuration.getvar()` are handled @@ -490,6 +491,9 @@ .. note:: Filters neeed no quoting -- and quoting within filters is *not* supported. +.. note:: Quoting the ``ref`` namespace name does not work currently when + used in variable interpolation syntax. + Custom filename extensions and custom loaders --------------------------------------------- diff -r ebd662a8376e -r 176e22110fc5 tests/test.py --- a/tests/test.py Sat May 08 18:55:39 2021 +0200 +++ b/tests/test.py Sat May 08 19:19:35 2021 +0200 @@ -807,6 +807,10 @@ self.assertEqual(v1, v5) self.assertEqual(v1, v6) + def test_direct_ref_namespace_quoting(self): + v = self._cfg.getvar_s("re%x66:#%x23%u003a%x7c%U00000025%x2e.%x2e.%x3a.%x25.%x7c./.%x23") + self.assertEqual("value", v) + if __name__ == "__main__": unittest.main()