()
| 136 | |
| 137 | #[test] |
| 138 | fn atomic_write_fsync_roundtrip() { |
| 139 | let dir = tempfile::tempdir().unwrap(); |
| 140 | let dst = dir.path().join("payload.ckpt"); |
| 141 | let tmp = dir.path().join("payload.ckpt.tmp"); |
| 142 | |
| 143 | atomic_write_fsync(&tmp, &dst, b"hello world").unwrap(); |
| 144 | assert!(!tmp.exists(), "tmp must be renamed away"); |
| 145 | assert_eq!(fs::read(&dst).unwrap(), b"hello world"); |
| 146 | } |
| 147 | |
| 148 | #[test] |
| 149 | fn atomic_write_fsync_overwrites() { |
nothing calls this directly
no test coverage detected