diff options
-rw-r--r-- | test/test1.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/test1.c b/test/test1.c index b340db1..5e6e67c 100644 --- a/test/test1.c +++ b/test/test1.c @@ -161,11 +161,17 @@ exit_error: CmdArgFlag *enableText = new CmdArgFlag(); CmdArgFlagConf enableTextConf = CmdArgFlagConf(); - CmdArgDefault enableTextDefault = CmdArgDefault((char *)"-t", &enableTextConf, (char *)"enable text", enableText); + CmdArgDefault enableTextDefault = CmdArgDefault((char *)"-b", &enableTextConf, (char *)"enable text", enableText); + + CmdArgVal *setFilename = new CmdArgVal(); + CmdArgValConf setFilenameConf = CmdArgValConf(); + CmdArgDefault setFilenameDefault = CmdArgDefault((char *)"-c", &setFilenameConf, (char *)"set filename", setFilename); + CmdArg arguments = CmdArg(); arguments.add(&enableTextDefault); arguments.add(&enableDefault); + arguments.add(&setFilenameDefault); arguments.load(argc, argv); @@ -177,6 +183,10 @@ exit_error: printf("enable text is set\n"); } + if (setFilename->isUsed()) { + printf("filename set to %s\n", setFilename->getValue()); + } + } |