| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -634,6 +634,8 @@ def read(self) -> None: # type: ignore[override] | |||
| 634 | 634 | files_to_read = list(self._file_or_files) | |
| 635 | 635 | # END ensure we have a copy of the paths to handle | |
| 636 | 636 | ||
| 637 | + files_to_read = [osp.abspath(path) if isinstance(path, (str, os.PathLike)) else path for path in files_to_read] | ||
| 638 | + | ||
| 637 | 639 | seen = set(files_to_read) | |
| 638 | 640 | num_read_include_files = 0 | |
| 639 | 641 | while files_to_read: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -310,6 +310,20 @@ def check_test_value(cr, value): | |||
| 310 | 310 | with GitConfigParser(fpa, read_only=True) as cr: | |
| 311 | 311 | check_test_value(cr, tv) | |
| 312 | 312 | ||
| 313 | + @with_rw_directory | ||
| 314 | + def test_config_relative_path_include(self, rw_dir): | ||
| 315 | + included_path = osp.join(rw_dir, "included") | ||
| 316 | + with GitConfigParser(included_path, read_only=False) as cw: | ||
| 317 | + cw.set_value("included", "value", "included") | ||
| 318 | + | ||
| 319 | + config_path = osp.join(rw_dir, "config") | ||
| 320 | + with GitConfigParser(config_path, read_only=False) as cw: | ||
| 321 | + cw.set_value("include", "path", "included") | ||
| 322 | + | ||
| 323 | + relative_config_path = osp.relpath(config_path) | ||
| 324 | + with GitConfigParser(relative_config_path, read_only=True) as cr: | ||
| 325 | + assert cr.get_value("included", "value") == "included" | ||
| 326 | + | ||
| 313 | 327 | @with_rw_directory | |
| 314 | 328 | def test_multiple_include_paths_with_same_key(self, rw_dir): | |
| 315 | 329 | """Test that multiple 'path' entries under [include] are all respected. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments