MCPcopy Create free account
hub / github.com/Nariod/RustPacker / test_read_shellcode_empty

Function test_read_shellcode_empty

src/shellcode_reader.rs:34–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33 #[test]
34 fn test_read_shellcode_empty() {
35 let dir = std::env::temp_dir().join("rustpacker_test_reader_empty");
36 fs::create_dir_all(&dir).unwrap();
37 let path = dir.join("empty.bin");
38 fs::write(&path, &[]).unwrap();
39
40 let result = read_shellcode(&path);
41 assert!(result.is_empty());
42
43 fs::remove_dir_all(&dir).unwrap();
44 }
45}

Callers

nothing calls this directly

Calls 1

read_shellcodeFunction · 0.85

Tested by

no test coverage detected