mirror of
https://codeberg.org/icewind/vdf-reader.git
synced 2026-06-03 10:04:08 +02:00
better errors for unmatched variants
This commit is contained in:
parent
d54e44b51d
commit
23bc240d4f
5 changed files with 84 additions and 8 deletions
4
tests/errors/unmatched.vdf
Normal file
4
tests/errors/unmatched.vdf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
"Resource"
|
||||
{
|
||||
foo
|
||||
}
|
||||
|
|
@ -158,6 +158,7 @@ struct GameList {
|
|||
#[test_case("tests/data/messy.vdf")]
|
||||
#[test_case("tests/data/DialogConfigOverlay_1280x720.vdf")]
|
||||
#[test_case("tests/data/serde_array_type.vdf")]
|
||||
#[test_case("tests/errors/unmatched.vdf")]
|
||||
#[test_case("tests/errors/concrete.vmt")]
|
||||
#[test_case("tests/errors/novalue.vdf")]
|
||||
#[test_case("tests/errors/serde_array_type.vdf")]
|
||||
|
|
|
|||
14
tests/snapshots/serde__tests__errors__unmatched.vdf.snap
Normal file
14
tests/snapshots/serde__tests__errors__unmatched.vdf.snap
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
source: tests/serde.rs
|
||||
expression: out
|
||||
---
|
||||
vmt_parser::unknown_variant
|
||||
|
||||
× Unknown variant "Resource" expected on of expected on of Types, LightmappedGeneric, Resource/specificPanel.res, UserConfigData
|
||||
╭─[1:1]
|
||||
1 │ "Resource"
|
||||
· ─────┬────
|
||||
· ╰── expected on of Types, LightmappedGeneric, Resource/specificPanel.res, UserConfigData
|
||||
2 │ {
|
||||
╰────
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue