From cb3f267d4562c0a23ebf16b758e421d77c0dc51c Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 8 Jul 2015 22:17:20 +0100 Subject: Add coverage to the unit test makefile targets The tests now only require that the test name is added to the TESTS variable and a testname_SRCS is set with a list of required sources to compile. --- test/nsoption.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/nsoption.c') diff --git a/test/nsoption.c b/test/nsoption.c index 1c9116acb..0f079e9f7 100644 --- a/test/nsoption.c +++ b/test/nsoption.c @@ -9,7 +9,7 @@ #include "utils/log.h" #include "utils/nsoption.h" -bool verbose_log = true; + nserror gui_options_init_defaults(struct nsoption_s *defaults) { @@ -70,9 +70,11 @@ int main(int argc, char**argv) { FILE *fp; + verbose_log = false; + nsoption_init(gui_options_init_defaults, NULL, NULL); - nsoption_read("data/Choices", NULL); + nsoption_read("test/data/Choices", NULL); nsoption_write("Choices-short", NULL, NULL); -- cgit v1.2.1