kiki 7.0.0

A minimalist parser generator for Rust.
Documentation
use super::*;

#[test]
fn balanced_parens() {
    let src = r#"// This code was generated by Kiki.
// Kiki is an open-source minimalist parser generator for Rust.
// You can read more at https://crates.io/crates/kiki
//
// This code was generated from a grammar with the following hash:
// @sha256 544841a802e160291407ce92621aabf4940055abd8d03e7964dde46f873aff2b"#;

    let expected = Some("544841a802e160291407ce92621aabf4940055abd8d03e7964dde46f873aff2b");

    let actual = get_grammar_hash(RustSrcRef(src));

    assert_eq!(actual, expected);
}

#[test]
fn esoteric_balanced_parens() {
    let src = r#"// This code was generated by Kiki.
// Kiki is an open-source minimalist parser generator for Rust.
// You can read more at https://crates.io/crates/kiki
//
// This code was generated from a grammar with the following hash:
// @sha256 8b2fc853275605761dc2ff01845103bfe20bf78a0ed8c6ecb4bab49cb74ced46
"#;

    let expected = Some("8b2fc853275605761dc2ff01845103bfe20bf78a0ed8c6ecb4bab49cb74ced46");

    let actual = get_grammar_hash(RustSrcRef(src));

    assert_eq!(actual, expected);
}