# HG changeset patch # User Franz Glasner # Date 1698575785 -3600 # Node ID 20e3c2d956d924731e40b762119825f1cd6f89b2 # Parent 282c8e64d7b1e4142950b5435dcf3f365fc41869 More tests for nested filters diff -r 282c8e64d7b1 -r 20e3c2d956d9 tests/test.py --- a/tests/test.py Sun Oct 29 11:32:56 2023 +0100 +++ b/tests/test.py Sun Oct 29 11:36:25 2023 +0100 @@ -2474,6 +2474,30 @@ u(os.path.join("a", "b", "d")), np) + def test_nested_filter_normpath_posixpath_2(self): + p1 = u(os.path.join("a", "b", "C", "d")) + cfg1 = { + u("path1"): p1, + u("path2"): u("{{|{{path1}}/../e|normpath,posixpath|}}") + } + cfg = cfg = configmix.config.Configuration(cfg1) + np = cfg.getvarl_s(u("path2")) + self.assertEqual( + u(os.path.join("a", "b", "C", "e")), + np) + + def test_nested_filter_normpath_posixpath_upper(self): + p1 = u(os.path.join("a", "b", "C", "d")) + cfg1 = { + u("path1"): p1, + u("path2"): u("{{|{{path1}}/../e|normpath,posixpath,upper|}}") + } + cfg = cfg = configmix.config.Configuration(cfg1) + np = cfg.getvarl_s(u("path2")) + self.assertEqual( + u(os.path.join("A", "B", "C", "E")), + np) + class T09Parser(_TParserMixin, unittest.TestCase):