()
| 18 | |
| 19 | #[test] |
| 20 | fn test_read_shellcode_content() { |
| 21 | let dir = std::env::temp_dir().join("rustpacker_test_reader"); |
| 22 | fs::create_dir_all(&dir).unwrap(); |
| 23 | let path = dir.join("test.bin"); |
| 24 | let content: Vec<u8> = vec![0xDE, 0xAD, 0xBE, 0xEF]; |
| 25 | fs::write(&path, &content).unwrap(); |
| 26 | |
| 27 | let result = read_shellcode(&path); |
| 28 | assert_eq!(result, content); |
| 29 | |
| 30 | fs::remove_dir_all(&dir).unwrap(); |
| 31 | } |
| 32 | |
| 33 | #[test] |
| 34 | fn test_read_shellcode_empty() { |
nothing calls this directly
no test coverage detected