From c3fc83f2333eaee5fbcbef6df9f4ed9eb320fd11 Mon Sep 17 00:00:00 2001 From: Jeremy Retailleau Date: Wed, 2 Sep 2020 17:38:43 -0700 Subject: Add missing rules to match hierarchy path --- test/test_config.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/test_config.py') diff --git a/test/test_config.py b/test/test_config.py index 12fad15c..406d794e 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -299,6 +299,14 @@ class TestBase(TestCase): assert not config._has_includes() assert config._included_paths() == [] + # Ensure that config is included if path in hierarchy. + with open(path1, "w") as stream: + stream.write(template.format("gitdir", "target1/", path2)) + + with GitConfigParser(path1, repo=repo) as config: + assert config._has_includes() + assert config._included_paths() == [("path", path2)] + @with_rw_directory def test_conditional_includes_from_branch_name(self, rw_dir): # Initiate mocked branch -- cgit v1.2.1