From 9a8573a38112dc0d89cb406f2ed185b8da26be34 Mon Sep 17 00:00:00 2001 From: Marrub Date: Tue, 5 Feb 2019 17:52:32 -0500 Subject: [PATCH] add machdr test --- tests/macbin.in | Bin 0 -> 128 bytes tests/machdr.rs | 14 ++++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/macbin.in create mode 100644 tests/machdr.rs diff --git a/tests/macbin.in b/tests/macbin.in new file mode 100644 index 0000000000000000000000000000000000000000..748a709fb6ebe5a5df7e2a2a7c9139cf22e6a24e GIT binary patch literal 128 zcmZQz_Dw8cpa2vnry3cV>1|+SU@!q<5SaF2E5p(wUhCE*2Y@h8B-hE)uK^^50^%(g F7yyxm4rl-X literal 0 HcmV?d00001 diff --git a/tests/machdr.rs b/tests/machdr.rs new file mode 100644 index 0000000..bd8ed5e --- /dev/null +++ b/tests/machdr.rs @@ -0,0 +1,14 @@ +use maraiah::marathon::machdr::*; + +// TODO: missing test data for applesingle + +#[test] +fn macbin_must_process_this() +{ + assert_eq!( check_macbin(INPUT_MACBIN), Some(128)); + assert_eq!(try_mac_header(INPUT_MACBIN), 128); +} + +const INPUT_MACBIN: &'static [u8] = include_bytes!("macbin.in"); + +// EOF