polybar-dwm/tests
TheDoctor314 6d1ff41d37
Handle relative includes (#2535)
* Handle relative includes

We change to the directory of the given config file before parsing.
This allows us to handle relative includes.
TODO: Maybe improve the name of the change_dir() function.

* Fix unused result warning

* Add `relative_to` parameter to expand()

If the path is relative, we resolve it by prepending
dirname(config) to the path.

Add dirname() - Returns the parent directory of the file or an empty
string.

* Resolve relative paths

Handle paths relative to the current file being parsed.

* Remove unneeded change_dir()

* Fix expand()

`is_absolute` is calculated after we expand the path.
`relative_to` must be a directory.

Add test for expand() with relative paths

* Recalculate `is_absolute` after expanding `path`

* Add more file_util::expand tests

* Add changelog

Co-authored-by: patrick96 <p.ziegler96@gmail.com>
2021-10-20 12:31:15 +02:00
..
common refactor(test): Remove old testing harness 2018-07-31 13:20:27 -07:00
unit_tests Handle relative includes (#2535) 2021-10-20 12:31:15 +02:00
CMakeLists.txt feat(xkeyboard): Icon matching using variant (#2521) 2021-10-05 12:12:47 +02:00
CMakeLists.txt.in Use master branch for googletest (#2451) 2021-06-16 17:46:53 +02:00