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

Function test_write_file_binary

atomic-core/src/output/filesystem/tests.rs:337–348  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

335
336#[test]
337fn test_write_file_binary() {
338 let (dir, fs) = temp_fs();
339 let binary_data: Vec<u8> = (0..=255).collect();
340
341 {
342 let mut writer = fs.write_file("binary.bin", Inode::new(1)).unwrap();
343 writer.write_all(&binary_data).unwrap();
344 }
345
346 let contents = std::fs::read(dir.path().join("binary.bin")).unwrap();
347 assert_eq!(contents, binary_data);
348}
349
350#[test]
351fn test_file_writer_inode() {

Callers

nothing calls this directly

Calls 4

temp_fsFunction · 0.85
unwrapMethod · 0.45
write_fileMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected