56 testLine(
"eat more spam");
57 testLine(
" oo _O()O_ ☭ + €");
58 testLine(
"Ω\tooΩ\toΩo\tΩoo");
64 testLine (
const string cmdline)
66 cout <<
"wrapping cmdline:" << cmdline <<
"..." << endl;
70 for_each(theCmdline, [&](
string const& arg) { cout << i++ <<
"|" << arg <<
"|\n";});
71 cout <<
"-->" << theCmdline << endl;
74 std::ostringstream output;
76 CHECK (output.str() == string(theCmdline));
80 std::istringstream input(theCmdline);
81 while (input >> token)
82 CHECK (token == theCmdline[i++]);
91 const char* fakeArg[3] = {
"CMD",
"one ",
"two"};
93 cout <<
"Standard Cmdlineformat:" << theCmdline << endl;
Implementation namespace for support and library code.
Class to encapsulate the typical C-style commandline definition.
Simple 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...