mirror of
https://codeberg.org/icewind/vmt-parser.git
synced 2026-08-02 12:24:46 +02:00
fix tests
This commit is contained in:
parent
27a4f9fc38
commit
8513568506
11 changed files with 394 additions and 424 deletions
|
|
@ -24,12 +24,12 @@ fn test_serde(path: &str) {
|
|||
let raw = read_to_string(path).unwrap();
|
||||
match from_str(&raw) {
|
||||
Ok(result) => {
|
||||
insta::assert_ron_snapshot!(path, result);
|
||||
insta::assert_json_snapshot!(path, result);
|
||||
if let Material::Patch(patch) = result {
|
||||
let patched = patch
|
||||
.resolve(|path| read_to_string(path).map_err(LoaderError::from))
|
||||
.unwrap();
|
||||
insta::assert_ron_snapshot!(format!("{}_resolved", path), patched);
|
||||
insta::assert_json_snapshot!(format!("{}_resolved", path), patched);
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue