core: command-line: better test args

This commit is contained in:
Peter D. Barnes, Jr
2022-10-25 07:39:10 -07:00
committed by Gabriel Ferreira
parent 9174178cc2
commit 3ee7fde2c6
2 changed files with 15 additions and 10 deletions

View File

@@ -2,13 +2,14 @@
command-line-example:
Argument Initial Value Final Value
intArg: 1 1
boolArg: false false
strArg: "strArg default" "strArg default"
anti: "false" "false"
cbArg: cbArg default cbArg default
nonOpt1: 1 1
nonOpt2: 1 1
Number of extra non-option arguments: 0
intArg: 1 2
boolArg: false true
strArg: "strArg default" "deadbeef"
anti: "false" "true"
cbArg: cbArg default beefstew
nonOpt1: 1 3
nonOpt2: 1 4
Number of extra non-option arguments: 2
extra non-option 0: "extraOne"
extra non-option 1: "extraTwo"

View File

@@ -71,7 +71,11 @@ class CommandLineExampleTestCase : public ExampleAsTestCase
};
CommandLineExampleTestCase::CommandLineExampleTestCase()
: ExampleAsTestCase("core-example-command-line", "command-line-example", NS_TEST_SOURCEDIR)
: ExampleAsTestCase("core-example-command-line",
"command-line-example",
NS_TEST_SOURCEDIR,
"--intArg=2 --boolArg --strArg=deadbeef --anti=t "
"--cbArg=beefstew 3 4 extraOne extraTwo")
{
}