From c7bd8393aaa7c48d6dc93fbd40142c08eed3ef8d Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 18 Aug 2021 21:24:54 +0200 Subject: [PATCH] tests: Add include test case for multiple files in sub-dirs This stresses the previously broken case of the incorrectly detected repository root while including files. Signed-off-by: Jan Kiszka --- tests/test_includehandler.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/test_includehandler.py b/tests/test_includehandler.py index ac7e613..50c2c87 100644 --- a/tests/test_includehandler.py +++ b/tests/test_includehandler.py @@ -230,6 +230,24 @@ header: 'rmiss': [ ] }, + # Include two files from another repo in sub-directories: + { + 'fdict': { + 'x.yml': header.format( + ' includes: [{repo: rep, file: dir1/y.yml}]'), + '/rep/dir1/y.yml': header.format( + ' includes: ["dir2/z.yml"]'), + '/rep/dir2/z.yml': header.format('\nv:') + }, + 'rdict': { + 'rep': '/rep' + }, + 'conf': { + 'v': None + }, + 'rmiss': [ + ] + }, ] self.util_include_content(testvector, monkeypatch)