mirror of
https://codeberg.org/icewind/vmt-parser.git
synced 2026-06-03 20:14:06 +02:00
patch
This commit is contained in:
parent
9fff536cc3
commit
b6a7ee888b
4 changed files with 28 additions and 0 deletions
8
tests/data/patch.vmt
Normal file
8
tests/data/patch.vmt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
"patch"
|
||||
{
|
||||
"include" "materials/glass/glasswindow001a.vmt"
|
||||
"replace"
|
||||
{
|
||||
"$envmap" "maps/koth_bagel_rc2a/c1920_704_41"
|
||||
}
|
||||
}
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
10
tests/snapshots/parse__tests__data__patch.vmt.snap
Normal file
10
tests/snapshots/parse__tests__data__patch.vmt.snap
Normal 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",
|
||||
},
|
||||
))
|
||||
Loading…
Add table
Add a link
Reference in a new issue