From 6e313a4289d0dd30246cfbb8a0bef4309b9e2a15 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sun, 16 May 2021 23:16:10 -0400 Subject: Add test for --default (#8) * Add test for --default * Remove trailing semi-colon from windows path --- src/main.c | 2 +- tests/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 71cc6fd..0b182fe 100644 --- a/src/main.c +++ b/src/main.c @@ -61,7 +61,7 @@ static int show_default_path() { #if OS_WINDOWS // I could not find anything in MSDN about dumping default path information. // The internet agrees "this" is "it" (XP/Vista/8/10): - strncpy(buf, "%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;", sizeof(buf)); + strncpy(buf, "%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem", sizeof(buf)); #elif HAVE_CONFSTR // POSIX size_t cf_status; cf_status = confstr(_CS_PATH, buf, sizeof(buf)); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c494fd2..0134945 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -45,3 +45,4 @@ endif() add_test(cmd_arg_help ${exec} --help) add_test(cmd_arg_version ${exec} --version) add_test(cmd_arg_list ${exec} --list) +add_test(cmd_arg_default ${exec} --default) -- cgit