Make it possible to change the command line options prefix #158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When including doctest in a production executable, the "dt-" prefix is too
unclear for most users. Add a DOCTEST_CONFIG_OPTIONS_PREFIX define so
the prefix can be changed.
Also make sure that when DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS is set,
the help text displays the correct help options.
Note: this patch arose out of two different needs:
dt-
is clear as a prefix for users who know about doctest, but is not so clear when integrating the code into a production application, which already has a number of options. So a way was needed to choose a different prefix (we choseselftest-
).I know that this patch makes the printing a bit harder to read - I'm open to suggestions on how to do that more cleanly.
Also, this patch solves two issues at once, but since they touch the same code area and I developed them at the same time, this is just one patch for now. If need be, I can split them into two patches.