test: initial external unit test suite for ‘config.c’

This patch adds a separate (external) test binary with unit tests for
config.c

This is achieved by having the test’s source file include
config.c (yes, the C file, not the header file).

This allows us to call e.g. parse_section_*() directly, without having
to go through config_load() (which requires having a readable file at
“path”).
This commit is contained in:
Daniel Eklöf 2021-11-27 17:23:33 +01:00
parent c685406a13
commit e1c3bdc6f2
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 102 additions and 0 deletions

View file

@ -272,6 +272,7 @@ endif
subdir('completions')
subdir('icons')
subdir('tests')
summary(
{