()
| 689 | |
| 690 | #[test] |
| 691 | fn test_move_nonexistent_fails() { |
| 692 | use atomic_core::pristine::Pristine; |
| 693 | use tempfile::TempDir; |
| 694 | |
| 695 | let temp_dir = TempDir::new().unwrap(); |
| 696 | let db_path = temp_dir.path().join("pristine.redb"); |
| 697 | |
| 698 | let pristine = Pristine::open(&db_path).unwrap(); |
| 699 | |
| 700 | // Try to move nonexistent file |
| 701 | { |
| 702 | let mut txn = pristine.write_txn().unwrap(); |
| 703 | let result = move_tracked(&mut txn, "nonexistent.txt", "new.txt"); |
| 704 | assert!(result.is_err()); |
| 705 | assert!(matches!( |
| 706 | result.unwrap_err(), |
| 707 | TrackingError::NotTracked { .. } |
| 708 | )); |
| 709 | } |
| 710 | } |
| 711 | |
| 712 | /// A graph-bound inode belongs to the change that bound it, so untracking it by |
| 713 | /// editing the derived tables must be refused rather than wipe the binding. |
nothing calls this directly
no test coverage detected