comline/tests/idl/pest.rs
2023-06-24 04:16:35 +01:00

27 lines
484 B
Rust

// Standard Uses
// Local Uses
// External Uses
use comline::idl;
use comline::idl::constants::SCHEMA_EXTENSION;
use comline::ir::unit::Unit;
#[test]
fn from_raw_to_unit() {
let raw = std::fs::read_to_string(
format!("tests/idl/simple.{}", SCHEMA_EXTENSION)
).unwrap();
let unit = idl::pest::parse_into_unit(raw.as_str()).unwrap();
assert_eq!(
unit, Unit::Items(vec![
Unit::Namespace("".to_string()),
]
)
)
}