From e1c3bdc6f2658e5c0f3bf128000f3dc1dc7f88bb Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 27 Nov 2021 17:23:33 +0100 Subject: test: initial external unit test suite for ‘config.c’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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”). --- tests/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/meson.build (limited to 'tests/meson.build') diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 00000000..8618bf04 --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,8 @@ +config_test = executable( + 'test-config', + 'test-config.c', '../tokenize.c', + wl_proto_headers, + link_with: [common], + dependencies: [pixman, xkb, fcft]) + +test('config', config_test) -- cgit v1.3