()
| 192 | |
| 193 | #[test] |
| 194 | fn view_flag_is_removed() { |
| 195 | // `--view` was removed; switching views is `atomic view switch`. clap |
| 196 | // should reject the unknown flag before any work happens. |
| 197 | let dir = repo_with_recorded_file(); |
| 198 | let root = dir.path(); |
| 199 | |
| 200 | let out = atomic(root, &["restore", "--view", "feature", "--force"]); |
| 201 | assert!(!out.status.success(), "--view should no longer be accepted"); |
| 202 | let stderr = String::from_utf8_lossy(&out.stderr); |
| 203 | assert!( |
| 204 | stderr.contains("unexpected argument") || stderr.contains("--view"), |
| 205 | "clap should reject --view, got: {stderr}" |
| 206 | ); |
| 207 | } |
| 208 | |
| 209 | #[test] |
| 210 | fn view_flag_is_removed_for_reset_alias_too() { |
nothing calls this directly
no test coverage detected