Got parseCommandLine ready to use new Clara (but not doing so yet)

This commit is contained in:
Phil Nash
2013-05-31 18:48:31 +01:00
parent f330fe7ef9
commit 0514fe4f38
4 changed files with 118 additions and 8 deletions

View File

@@ -16,7 +16,7 @@
// Helper to deduce size from array literals and pass on to parser
template<size_t size, typename ConfigT>
std::vector<Clara::Parser::Token> parseInto( Clara::CommandLine<ConfigT>& cli, char const* (&argv)[size], ConfigT& config ) {
std::vector<Clara::Parser::Token> parseInto( Clara::CommandLine<ConfigT>& cli, char const * (&argv)[size], ConfigT& config ) {
return cli.parseInto( size, argv, config );
}
@@ -56,7 +56,7 @@ TEST_CASE( "cmdline" ) {
.argName( "filename" );
SECTION( "arg separated by spaces" ) {
const char* argv[] = { "test", "-o filename.ext" };
char const * argv[] = { "test", "-o filename.ext" };
parseInto( cli, argv, config );
CHECK( config.fileName == "filename.ext" );