Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty (predicate) override option doesn't clear previous values #57

Closed
xparq opened this issue Nov 7, 2023 · 0 comments
Closed

Empty (predicate) override option doesn't clear previous values #57

xparq opened this issue Nov 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@xparq
Copy link
Owner

xparq commented Nov 7, 2023

These all fail (note: the test app has --greedy and -G as "greedy", but that doesn't matter here):

SH echo Override with empty, long greedy
RUN args-test --greedy 1 2 3 --greedy
EXPECT "Override with empty, long
-------- NAMED (1):
greedy
-------- POSITIONAL (0):
"

Should also verify this then:

SH echo Override with empty, short greedy
RUN args-test --G 1 2 3 -G
EXPECT "Override with empty, long
-------- NAMED (1):
G
-------- POSITIONAL (0):
"

And of course the simplest case of empty override:

RUN args-test --thing=1 --thing
EXPECT "Override with empty, long
-------- NAMED (1):
thing
-------- POSITIONAL (0):
"

Non-greedy known ones can't be empty (--take-two takes 2)?

SH echo Override with empty, long (ERROR: insufficient parameters)
RUN args-test --take-two 1 2 3 --take-two
EXPECT "Override with empty, long
-------- NAMED (1):
take-two
-------- POSITIONAL (0):
"

...and:

SH echo Override with empty, short
RUN args-test --G 1 2 3 -G
EXPECT "Override with empty, long
-------- NAMED (1):
G
-------- POSITIONAL (0):
"
@xparq xparq added the bug Something isn't working label Nov 7, 2023
@xparq xparq pinned this issue Nov 7, 2023
@xparq xparq closed this as completed in 1c26c83 Nov 8, 2023
@xparq xparq unpinned this issue Nov 8, 2023
xparq added a commit that referenced this issue Nov 8, 2023
+ Close #8: short aggregates (with params)
+ Fix #57: empty overrides (shorts needed special-casing)
+ RepeatIsError is implemented
+ More tests
+ Some refactoring to support these changes
+ Capitalized most comments & other cosmetics
xparq added a commit that referenced this issue Nov 8, 2023
+ Close #8: short aggregates (with params)
+ Fix #57: empty overrides (shorts needed special-casing)
+ RepeatIsError is implemented
+ More tests
+ Some refactoring to support these changes
+ Capitalized most comments & other cosmetics
xparq added a commit that referenced this issue Nov 8, 2023
+ Close #8: short aggregates (with params)
+ Fix #57: empty overrides (shorts needed special-casing)
+ RepeatIsError is implemented
+ More tests (but had to disable the /? case though for quoting problems
  in Space Test, as /? kept matching /a on GitHub :) )
+ Some refactoring to support these changes
+ Capitalized most comments & other cosmetics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant