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

Function reset_alias_still_works

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

Source from the content-addressed store, hash-verified

47
48#[test]
49fn reset_alias_still_works() {
50 // The legacy `reset` name is kept as an alias for `restore`.
51 let dir = repo_with_recorded_file();
52 let root = dir.path();
53
54 std::fs::write(root.join("file.txt"), b"local edit\n").unwrap();
55
56 let out = atomic(root, &["reset", "file.txt"]);
57 assert!(out.status.success(), "reset alias should still work");
58 assert_eq!(std::fs::read(root.join("file.txt")).unwrap(), b"v1\n");
59}
60
61#[test]
62fn restore_named_file_not_blocked_by_unrelated_dirty_file() {

Callers

nothing calls this directly

Calls 5

writeFunction · 0.85
atomicFunction · 0.85
repo_with_recorded_fileFunction · 0.70
pathMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected