use fileidentifier::check::*; use std::fs; #[test] fn get_file_format_test() { let file = fs::read("tests/files/x.png").unwrap(); let file_type = get_file_format(&file); assert_eq!(FileFormat::Png, file_type); } #[test] fn is_something_test() { let file = fs::read("tests/files/x.png").unwrap(); assert_eq!(true, is_png(&file)); assert_eq!(false, is_pdf(&file)); }