()
| 1074 | |
| 1075 | #[test] |
| 1076 | fn test_write_file_overwrites() { |
| 1077 | let wc = Memory::new(); |
| 1078 | wc.add_file("test.txt", b"old content"); |
| 1079 | |
| 1080 | let inode = wc.allocate_inode(); |
| 1081 | { |
| 1082 | let mut writer = wc.write_file("test.txt", inode).unwrap(); |
| 1083 | writer.write_all(b"new content").unwrap(); |
| 1084 | } |
| 1085 | |
| 1086 | assert_eq!(wc.get_file_contents("test.txt").unwrap(), b"new content"); |
| 1087 | } |
| 1088 | |
| 1089 | // ------------------------------------------------------------------------- |
| 1090 | // MemoryError Tests |
nothing calls this directly
no test coverage detected