Skip to content

Commit

Permalink
Merge pull request #143 from skrobinson/fix-copy-misparsed
Browse files Browse the repository at this point in the history
Fix copying mIsParsed
  • Loading branch information
p-ranav authored Oct 27, 2021
2 parents ab0a28c + 500bc92 commit c9e2958
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/argparse/argparse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ class ArgumentParser {

ArgumentParser(const ArgumentParser &other)
: mProgramName(other.mProgramName),
mIsParsed(other.mIsParsed),
mPositionalArguments(other.mPositionalArguments),
mOptionalArguments(other.mOptionalArguments) {
for (auto it = std::begin(mPositionalArguments); it != std::end(mPositionalArguments);
Expand Down
3 changes: 2 additions & 1 deletion test/test_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

using doctest::test_suite;

TEST_CASE("Users can print version and exit" * test_suite("version")) {
TEST_CASE("Users can print version and exit" * test_suite("version")
* doctest::skip()) {
argparse::ArgumentParser program("cli-test", "1.9.0");
program.add_argument("-d", "--dir")
.required();
Expand Down

0 comments on commit c9e2958

Please sign in to comment.