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:359–370  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357
358#[test]
359fn test_write_file_binary() {
360 let (dir, fs) = temp_fs();
361 let binary_data: Vec<u8> = (0..=255).collect();
362
363 {
364 let mut writer = fs.write_file("binary.bin", Inode::new(1)).unwrap();
365 writer.write_all(&binary_data).unwrap();
366 }
367
368 let contents = std::fs::read(dir.path().join("binary.bin")).unwrap();
369 assert_eq!(contents, binary_data);
370}
371
372#[test]
373fn test_file_writer_inode() {

Callers

nothing calls this directly

Calls 6

temp_fsFunction · 0.85
readFunction · 0.50
collectMethod · 0.45
unwrapMethod · 0.45
write_fileMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected