diff options
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/optparser.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/optparser.cpp b/src/tests/optparser.cpp index ee2ea58..5cf82bd 100644 --- a/src/tests/optparser.cpp +++ b/src/tests/optparser.cpp | |||
@@ -23,6 +23,8 @@ public: | |||
23 | o2.bShortHasParams = false; | 23 | o2.bShortHasParams = false; |
24 | o2.sHelp = "This is the second test parameter. It does not take parameters. However, I do want to make this part much longer to see how it looks when you add way too much text to one of these things. It can't really be that bad, right?"; | 24 | o2.sHelp = "This is the second test parameter. It does not take parameters. However, I do want to make this part much longer to see how it looks when you add way too much text to one of these things. It can't really be that bad, right?"; |
25 | addOption( o2 ); | 25 | addOption( o2 ); |
26 | |||
27 | addOption( 's', "str", sVar, "Set a variable, see what it does.", "bob!"); | ||
26 | 28 | ||
27 | addHelpOption('h', "help", "This help."); | 29 | addHelpOption('h', "help", "This help."); |
28 | } | 30 | } |
@@ -35,6 +37,7 @@ public: | |||
35 | } | 37 | } |
36 | 38 | ||
37 | int iBob; | 39 | int iBob; |
40 | Bu::FString sVar; | ||
38 | }; | 41 | }; |
39 | 42 | ||
40 | int main( int argc, char *argv[] ) | 43 | int main( int argc, char *argv[] ) |
@@ -42,5 +45,7 @@ int main( int argc, char *argv[] ) | |||
42 | Opts o; | 45 | Opts o; |
43 | 46 | ||
44 | o.parse( argc, argv ); | 47 | o.parse( argc, argv ); |
48 | |||
49 | sio << "sVar = \"" << o.sVar << "\"" << sio.nl; | ||
45 | } | 50 | } |
46 | 51 | ||