mirror of
https://codeberg.org/icewind/vmt-parser.git
synced 2026-08-02 12:24:46 +02:00
LightMappedGeneric
This commit is contained in:
parent
971b42452d
commit
ab10e2d05c
14 changed files with 378 additions and 243 deletions
18
tests/parse.rs
Normal file
18
tests/parse.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
use miette::{GraphicalReportHandler, GraphicalTheme};
|
||||
use std::fs::read_to_string;
|
||||
use test_case::test_case;
|
||||
use vmt_parser::from_str;
|
||||
|
||||
#[test_case("tests/data/concretefloor003.vmt")]
|
||||
fn test_serde(path: &str) {
|
||||
let raw = read_to_string(path).unwrap();
|
||||
match from_str(&raw) {
|
||||
Ok(result) => insta::assert_ron_snapshot!(path, result),
|
||||
Err(e) => {
|
||||
let handler = GraphicalReportHandler::new_themed(GraphicalTheme::unicode_nocolor());
|
||||
let mut out = String::new();
|
||||
handler.render_report(&mut out, &e).unwrap();
|
||||
insta::assert_snapshot!(path, out)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue