Skip to content

Add failing test for repeating multi-argument options - #140

Merged
henryiii merged 2 commits into
CLIUtils:masterfrom
seanfisk:add-repeating-multi-arg-option-test
Jun 26, 2018
Merged

henryiii merged 2 commits into
CLIUtils:masterfrom
seanfisk:add-repeating-multi-arg-option-test

Conversation

@seanfisk

Copy link
Copy Markdown
Contributor

Hi @henryiii, I still wasn't able to get #128 working. But I've finally had some time to work on this, so here is a failing test that showcases what I understand to be the proper success and failure behaviors. The success test passes but the ValidationError one does not.

Let me know what you think and thank you for working on this issue!

@henryiii

Copy link
Copy Markdown
Collaborator

Added a missing app.reset() in your test, and corrected the logic to catch mismatch in typesize and result vector. We'll see if that works!

@codecov

codecov Bot commented Jun 26, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #140 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #140   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines        1682   1686    +4     
=====================================
+ Hits         1682   1686    +4
Impacted Files Coverage Δ
include/CLI/Option.hpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fdf832...f3820f2. Read the comment docs.

@henryiii
henryiii merged commit 3cb75b9 into CLIUtils:master Jun 26, 2018
@seanfisk
seanfisk deleted the add-repeating-multi-arg-option-test branch June 26, 2018 17:19
@seanfisk

Copy link
Copy Markdown
Contributor Author

@henryiii Thanks much! That is working as intended now — you're the best!

Sorry, I know I had the app.reset() at one point; don't know how it got removed…

Do you mind if I add a few more tests for related behavior in the future?

@henryiii

henryiii commented Jun 26, 2018 •

Copy link
Copy Markdown
Collaborator

I don't think I'd ever refuse more tests! 👍

I might be able to drop the need for app.reset(), parse should reset the app before running, I believe.

Edit: #141.

@henryiii henryiii added this to the v1.6 milestone Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants