summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2018-07-31 20:11:52 +0100
committerFreeArtMan <dos21h@gmail.com>2018-07-31 20:11:52 +0100
commit4b360bb35739d57fddf2331c06c75f3ea51d01c6 (patch)
tree9499b9a655acbd376f0c218cfb4365e838d513a5 /test
parentfe1705589c593618ba6d070639eb55d210e3a83c (diff)
downloadlibarg++-4b360bb35739d57fddf2331c06c75f3ea51d01c6.tar.gz
libarg++-4b360bb35739d57fddf2331c06c75f3ea51d01c6.zip
test updated to test lates changes
Diffstat (limited to 'test')
-rw-r--r--test/test1.c12
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());
+ }
+
}