Changeset 979 for trunk/test
- Timestamp:
- Oct 21, 2007, 9:46:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/commandline_test.cc
r975 r979 34 34 bool test_switch(std::ostream& error); 35 35 bool test_arg(std::ostream& error); 36 bool test_file(std::ostream& error); 36 37 bool test_failures(std::ostream& error); 37 38 … … 56 57 ok &= test_switch(*error); 57 58 ok &= test_arg(*error); 59 ok &= test_file(*error); 58 60 ok &= test_failures(*error); 59 61 } … … 342 344 343 345 344 345 346 347 346 bool test_file(std::ostream& error) 347 { 348 bool ok=true; 349 CommandLine cmd; 350 OptionFile inclones(cmd, "clones", "file containing clones"); 351 OptionFile indata(cmd, "data", "data to merge"); 352 OptionSwitch help(cmd, "h,help", "display this help and exit"); 353 354 error << "Testing OptionFile... "; 355 { 356 int ac = 2; 357 char* av[] = { "test_prog", "-h" }; 358 cmd.parse(ac,av); 359 error << "ok\n"; 360 } 361 return ok; 362 } 363 364 365 366 367
Note: See TracChangeset
for help on using the changeset viewer.