diff --git a/.appveyor.yml b/.appveyor.yml index d917bf42..4b160ddc 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -24,6 +24,7 @@ build_script: -DCMAKE_BUILD_TYPE=Debug -DCMAKE_GENERATOR="Visual Studio 14 2015" - ps: cmake --build . - cd .. + - ps: set CTEST_OUTPUT_ON_FAILURE=1 - conan create . CLIUtils/CLI11 test_script: diff --git a/conanfile.py b/conanfile.py index 9dc6ce3a..b5b9e490 100644 --- a/conanfile.py +++ b/conanfile.py @@ -37,7 +37,7 @@ class CLI11Conan(ConanFile): def build(self): # this is not building a library, just tests cmake = CMake(self) - cmake.definitions["CLI11_EXAMPLES"] = "OFF" + cmake.definitions["CLI11_BUILD_EXAMPLES"] = "OFF" cmake.definitions["CLI11_SINGLE_FILE"] = "OFF" cmake.configure() cmake.build() diff --git a/include/CLI/ConfigFwd.hpp b/include/CLI/ConfigFwd.hpp index 44454b41..c5da8d27 100644 --- a/include/CLI/ConfigFwd.hpp +++ b/include/CLI/ConfigFwd.hpp @@ -61,7 +61,7 @@ class Config { if(item.inputs.empty()) { return "{}"; } - throw ConversionError::TooManyInputsFlag(item.fullname()); + throw ConversionError::TooManyInputsFlag(item.fullname()); // LCOV_EXCL_LINE } /// Parse a config file, throw an error (ParseError:ConfigParseError or FileError) on failure diff --git a/include/CLI/impl/Validators_inl.hpp b/include/CLI/impl/Validators_inl.hpp index f2fe5e55..9c9e25b9 100644 --- a/include/CLI/impl/Validators_inl.hpp +++ b/include/CLI/impl/Validators_inl.hpp @@ -132,7 +132,7 @@ CLI11_INLINE path_type check_path(const char *file) noexcept { return path_type::nonexistent; } switch(stat.type()) { - case std::filesystem::file_type::none: + case std::filesystem::file_type::none: // LCOV_EXCL_LINE case std::filesystem::file_type::not_found: return path_type::nonexistent; case std::filesystem::file_type::directory: diff --git a/scripts/mdlint_style.rb b/scripts/mdlint_style.rb index 6fca85b1..5cb3a979 100644 --- a/scripts/mdlint_style.rb +++ b/scripts/mdlint_style.rb @@ -6,3 +6,4 @@ exclude_rule 'MD034' # Bare URL (for now) rule 'MD026', punctuation: '.,;:!' # Trailing punctuation in header (& in this case) rule 'MD029', style: :ordered +rule 'MD007', indent: 2 diff --git a/tests/HelpersTest.cpp b/tests/HelpersTest.cpp index 44e15520..a5e5cbd6 100644 --- a/tests/HelpersTest.cpp +++ b/tests/HelpersTest.cpp @@ -525,6 +525,10 @@ TEST_CASE("Validators: ProgramNameSplit", "[helpers]") { res = CLI::detail::split_program_name(std::string(" ./") + std::string(myfile) + " "); CHECK(std::string("./") + std::string(myfile) == res.first); CHECK(res.second.empty()); + + res = CLI::detail::split_program_name("'odd_program_name.exe --arg --arg2=5"); + CHECK("'odd_program_name.exe" == res.first); + CHECK_FALSE(res.second.empty()); } TEST_CASE("CheckedMultiply: Int", "[helpers]") { @@ -1065,6 +1069,10 @@ TEST_CASE("Types: LexicalCastInt", "[helpers]") { std::string extra_input = "912i"; CHECK_FALSE(CLI::detail::lexical_cast(extra_input, y)); + extra_input = "true"; + CHECK(CLI::detail::lexical_cast(extra_input, x_signed)); + CHECK(x_signed != 0); + std::string empty_input{}; CHECK_FALSE(CLI::detail::lexical_cast(empty_input, x_signed)); CHECK_FALSE(CLI::detail::lexical_cast(empty_input, x_unsigned));