# HG changeset patch # User Franz Glasner # Date 1692195100 -7200 # Node ID 6d9552eb7e4d62c0a605d5f58c27fa2590ab16c3 # Parent 3547dea62ef6d6169e1282e21b9ea646f08cc07a Further test of filter-only expansions: with "normpath" diff -r 3547dea62ef6 -r 6d9552eb7e4d tests/test.py --- a/tests/test.py Wed Aug 16 14:00:38 2023 +0200 +++ b/tests/test.py Wed Aug 16 16:11:40 2023 +0200 @@ -2450,6 +2450,17 @@ y = getattr(cfg, self.interpolate_meth)(u"{{|pre_{{key-1}}_post|upper|}}") self.assertEqual(u("PRE_VALUE FOR KEY-1_POST"), y) + def test_global_filter_normpath(self): + cfg1 = { + u("path1"): u("a\\b\\c"), + u("path2"): u("{{|{{path1}}/../d|normpath|}}") + } + cfg = cfg = configmix.config.Configuration(cfg1) + np = cfg.getvarl_s(u("path2")) + self.assertEqual( + os.path.normpath(u("a/b/d")), + np) + class T09Parser(_TParserMixin, unittest.TestCase):