Ignore:
Timestamp:
Aug 21, 2008, 1:54:24 AM (13 years ago)
Author:
Peter
Message:

refs #413 seems like those args are just ignored now. Commandline should store those strings in a vector<string> that one can access.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/commandline_test.cc

    r1426 r1427  
    4141bool test_failures(yat::test::Suite& error);
    4242bool test_option_name_clash(yat::test::Suite& suite);
     43bool test_free_arg(yat::test::Suite& suite);
    4344
    4445int main(int argc, char* argv[])
     
    5657    suite.add(test_failures(suite));
    5758    suite.add(test_option_name_clash(suite));
     59    suite.add(test_free_arg(suite));
    5860  }
    5961  catch (std::runtime_error& e) {
     
    403405}
    404406
    405 
    406 
    407 
     407bool test_free_arg(yat::test::Suite& suite)
     408{
     409  bool ok=true;
     410  suite.err() << "Testing free arguments ...";
     411
     412  CommandLine cmd;
     413  OptionHelp help(cmd);
     414  int ac = 3;
     415  char* av[] = { "test_prog", "file", "kl"};
     416  cmd.parse(ac, av);
     417  suite.err() << "ok\n";
     418  return ok;
     419}
     420
     421
     422
Note: See TracChangeset for help on using the changeset viewer.