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

Add test stub that always fail to escape or quote #1307

Closed
ericcornelissen opened this issue Nov 22, 2023 · 0 comments · Fixed by #1530
Closed

Add test stub that always fail to escape or quote #1307

ericcornelissen opened this issue Nov 22, 2023 · 0 comments · Fixed by #1530
Assignees
Labels
enhancement New feature or request

Comments

@ericcornelissen
Copy link
Owner

Relates to #1149

Summary

Expand shescape/testing with a stub implementation that never fails to instantiate but always fails when used to .escape(All) or .quote(All) an argument.

The use case of this stub is to simulate what the target code does when shescape can't escape or quote the provided argument. As such, it would sit in between Stubscape and Throwscape as:

  • Stubscape: Nearly identical behavior to Shescape, but never fails to instantiate.
  • Failscape: Always fails to escape or quote, but never fails to instantiate.
  • Throwscape: Always fails to instantiate.

The key difference between Stubscape and Failscape is that the stub user won't have to worry about getting an invalid argument to the shescape call site, rather it just fails if that what needs to be tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant