()
| 47 | |
| 48 | #[test] |
| 49 | fn 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] |
| 62 | fn restore_named_file_not_blocked_by_unrelated_dirty_file() { |
nothing calls this directly
no test coverage detected