diff options
author | FreeArtMan <dos21h@gmail.com> | 2018-07-31 20:11:52 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2018-07-31 20:11:52 +0100 |
commit | 4b360bb35739d57fddf2331c06c75f3ea51d01c6 (patch) | |
tree | 9499b9a655acbd376f0c218cfb4365e838d513a5 | |
parent | fe1705589c593618ba6d070639eb55d210e3a83c (diff) | |
download | libarg++-4b360bb35739d57fddf2331c06c75f3ea51d01c6.tar.gz libarg++-4b360bb35739d57fddf2331c06c75f3ea51d01c6.zip |
test updated to test lates changes
-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()); + } + } |