use insta::assert_snapshot;
use mojique::{Config, DefaultConfig};
#[test]
fn buffer() -> anyhow::Result<()> {
let mut handle = DefaultConfig::default().build_handle()?;
let magic_type = handle.buffer(b"#include <stdio.h>")?;
assert_snapshot!(magic_type, @"C source, ASCII text, with no line terminators");
let magic_type = handle.buffer(b"")?;
assert_snapshot!(magic_type, @"empty");
Ok(())
}