-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #16: repeated options should override by default
+ New constructor to also accept config. flags + Test updates (also the engine, with an important fix -> 0.17)
- Loading branch information
Showing
11 changed files
with
94 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
20 changes: 10 additions & 10 deletions
20
test/issue 10.case/issue 10.cpp → ...ase/issue 10 (-long isn't a long opt).cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
#include "Args.hpp" | ||
#include <iostream> | ||
using namespace std; | ||
int main(int argc, char** argv) | ||
{ | ||
Args args(argc, argv); | ||
|
||
if (args["long"]) | ||
{ cout << "- 'long' was set\n"; } | ||
} | ||
#include "Args.hpp" | ||
#include <iostream> | ||
using namespace std; | ||
int main(int argc, char** argv) | ||
{ | ||
Args args(argc, argv); | ||
|
||
if (args["long"]) | ||
{ cout << "- 'long' was set\n"; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
RUN ../args-test --take-two=1 2 junk --take-two=a b | ||
|
||
EXPECT "-------- NAMED: | ||
take-two = a, b | ||
-------- POSITIONAL: | ||
junk | ||
" | ||
|
||
#-------------------------------------------------- | ||
# And try appending (Args::RepeatAppends), too... | ||
#-------------------------------------------------- | ||
alt="$CASE" | ||
RUN "$alt" --take-two=1 2 junk --take-two=a b | ||
|
||
EXPECT "-------- NAMED: | ||
take-two = 1, 2, a, b | ||
-------- POSITIONAL: | ||
junk | ||
" |
2 changes: 2 additions & 0 deletions
2
...ssue 16 (override on repeat by default).case/issue 16 (override on repeat by default).cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#define FLAGS Args::RepeatAppends | ||
#include "args-test.cpp" |
File renamed without changes.