aboutsummaryrefslogtreecommitdiffstats
path: root/tests/misc_bom.rs
blob: e26b40775e0095142c7f01f7553f8a6136fa3b06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate micromark;
use micromark::micromark;
use pretty_assertions::assert_eq;

#[test]
fn bom() -> Result<(), String> {
    assert_eq!(micromark("\u{FEFF}"), "", "should ignore just a bom");

    assert_eq!(
        micromark("\u{FEFF}# hea\u{FEFF}ding"),
        "<h1>hea\u{FEFF}ding</h1>",
        "should ignore a bom"
    );

    Ok(())
}