47 testLine(
"eat more spam");
48 testLine(
" oo _O()O_ ☭ + €");
49 testLine(
"Ω\tooΩ\toΩo\tΩoo");
55 testLine (
const string cmdline)
57 cout <<
"wrapping cmdline:" << cmdline <<
"..." << endl;
61 for_each(theCmdline, [&](
string const& arg) { cout << i++ <<
"|" << arg <<
"|\n";});
62 cout <<
"-->" << theCmdline << endl;
65 std::ostringstream output;
67 CHECK (output.str() == string(theCmdline));
71 std::istringstream input(theCmdline);
72 while (input >> token)
73 CHECK (token == theCmdline[i++]);
82 const char* fakeArg[3] = {
"CMD",
"one ",
"two"};
84 cout <<
"Standard Cmdlineformat:" << theCmdline << endl;
Implementation namespace for support and library code.
Class to encapsulate the typical C-style commandline definition.
Simplistic test class runner.
void testStandardCmdlineformat()
void for_each(CON const &elements, FUN function, P1 &&bind1, ARGS &&...args)
Accept binding for arbitrary function arguments.
Perform operations "for each element" of a collection.
Abstraction of the usual int argc, int** argv-Commandline, to be able to treat it as a vector of stri...