-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit 90f6ad8
max-sixtyMaximilian Roosclaude
authoredFix backward compatibility for --test-runner-fallback true syntax (#816)
This is a small fix to PR #811 which introduced `--test-runner-fallback`
and `--no-test-runner-fallback` flags.
## Issue
The previous PR added `require_equals = true` to the clap argument
configuration, which broke backward compatibility with the space syntax:
- ❌ `--test-runner-fallback true` (broke in #811)
- ✅ `--test-runner-fallback=true` (still worked)
The old implementation accepted both syntaxes, so this was a regression.
## Fix
Removed `require_equals = true` from the argument configuration to
restore backward compatibility. This allows all syntaxes to work:
**New ergonomic syntax:**
- `--test-runner-fallback` (no value)
- `--no-test-runner-fallback`
**Backward compatible syntax:**
- `--test-runner-fallback true` (with space) ✅ now fixed
- `--test-runner-fallback=true` (with equals)
- `--test-runner-fallback false`
- `--test-runner-fallback=false`
## Testing
- Added new test `test_runner_fallback_space_true` to cover the space
syntax
- All 7 test_runner_fallback tests pass
## Changes
- Removed `require_equals = true` from `cargo-insta/src/cli.rs`
- Added test for space syntax in
`cargo-insta/tests/functional/test_runner_fallback.rs`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Maximilian Roos <maximilian@Maximilians-MacBook-Pro.local>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 00f6816 commit 90f6ad8
File tree
2 files changed
+31
-1
lines changed- cargo-insta
- src
- tests/functional
2 files changed
+31
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | - | ||
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | + | ||
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | ||
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | ||
110 | + | ||
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | ||
117 | + | ||
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | ||
122 | + | ||
123 | + | ||
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | ||
97 | 128 | | |
98 | 129 | | |
99 | 130 | | |
| |||
0 commit comments