This commit is contained in:
Robin Appelman 2023-12-18 20:32:37 +01:00
commit b6a7ee888b
4 changed files with 28 additions and 0 deletions

8
tests/data/patch.vmt Normal file
View file

@ -0,0 +1,8 @@
"patch"
{
"include" "materials/glass/glasswindow001a.vmt"
"replace"
{
"$envmap" "maps/koth_bagel_rc2a/c1920_704_41"
}
}

View file

@ -7,6 +7,7 @@ use vmt_parser::from_str;
#[test_case("tests/data/mvm_backpack.vmt")]
#[test_case("tests/data/water_murky.vmt")]
#[test_case("tests/data/blendrocktograss002.vmt")]
#[test_case("tests/data/patch.vmt")]
fn test_serde(path: &str) {
let raw = read_to_string(path).unwrap();
match from_str(&raw) {

View file

@ -0,0 +1,10 @@
---
source: tests/parse.rs
expression: result
---
patch(PatchMaterial(
include: "materials/glass/glasswindow001a.vmt",
replace: {
"$envmap": "maps/koth_bagel_rc2a/c1920_704_41",
},
))