diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-04-08 14:51:57 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-04-27 11:38:53 +0300 |
commit | 720c5a33b6a49cf328fdd7611f49153cf8f60247 (patch) | |
tree | 9725f3d1f42ec90fde84520f49647edea013ce5e /tests/group/driver.cxx | |
parent | 3183f3bb927a90783ae0aeaf190a0919377aabe4 (diff) |
Separate tests and examples into individual packages
Also make cli module to be explicitly enabled via the config.cli configuration
variable.
Diffstat (limited to 'tests/group/driver.cxx')
-rw-r--r-- | tests/group/driver.cxx | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/tests/group/driver.cxx b/tests/group/driver.cxx deleted file mode 100644 index f24cdd8..0000000 --- a/tests/group/driver.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// file : tests/group/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// license : MIT; see accompanying LICENSE file - -// Test group_scanner. -// - -#include <iostream> - -#include "test.hxx" - -using namespace std; - -int -main (int argc, char* argv[]) -{ - try - { - using namespace cli; - - // Mode flags. - // - // 'g' -- don't handle groups. - // 's' -- skip arguments. - // - string m (argv[1]); - - argv_scanner as (--argc, ++argv); - group_scanner s (as); - - while (s.more ()) - { - if (m.find ('s') == string::npos) - { - const char* a (s.next ()); - cout << "'" << a << "'"; - } - else - s.skip (); - - if (m.find ('g') == string::npos) - { - scanner& gs (s.group ()); - while (gs.more ()) - cout << " '" << gs.next () << "'"; - } - - cout << endl; - } - - return 0; - } - catch (const cli::exception& e) - { - cerr << e << endl; - return 1; - } -} |