MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / view_flag_is_removed

Function view_flag_is_removed

atomic-cli/tests/restore_integration_test.rs:194–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

192
193#[test]
194fn 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]
210fn view_flag_is_removed_for_reset_alias_too() {

Callers

nothing calls this directly

Calls 3

atomicFunction · 0.85
repo_with_recorded_fileFunction · 0.70
pathMethod · 0.45

Tested by

no test coverage detected