From de3b674ea4baba4b699ebaddbb15639c024e3a0f Mon Sep 17 00:00:00 2001 From: Pavel Belikov Date: Fri, 4 May 2018 20:11:55 +0300 Subject: Add test for windows minmax --- test/windows_h.cxx | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/windows_h.cxx (limited to 'test/windows_h.cxx') diff --git a/test/windows_h.cxx b/test/windows_h.cxx new file mode 100644 index 0000000..a9befe1 --- /dev/null +++ b/test/windows_h.cxx @@ -0,0 +1,31 @@ +#include "windows.h" +#include +#include + +int main() +{ + args::ArgumentParser parser("This is a test program.", "This goes after the options."); + args::HelpFlag help(parser, "help", "Display this help menu", {'h', "help"}); + args::CompletionFlag completion(parser, {"complete"}); + try + { + parser.ParseCLI(argc, argv); + } + catch (args::Completion& e) + { + std::cout << e.what(); + return 0; + } + catch (args::Help&) + { + std::cout << parser; + return 0; + } + catch (args::ParseError& e) + { + std::cerr << e.what() << std::endl; + std::cerr << parser; + return 1; + } + return 0; +} -- cgit v1.2.1