toplevel keyvalues tests

This commit is contained in:
Robin Appelman 2023-12-18 21:52:35 +01:00
commit 6a332d051f
3 changed files with 11 additions and 0 deletions

2
tests/data/toplevel.vdf Normal file
View file

@ -0,0 +1,2 @@
foo 1
bar asd

View file

@ -6,6 +6,7 @@ use vdf_reader::Reader;
#[test_case("tests/data/concrete.vmt")]
#[test_case("tests/data/messy.vdf")]
#[test_case("tests/data/DialogConfigOverlay_1280x720.vdf")]
#[test_case("tests/data/toplevel.vdf")]
fn test_parse(path: &str) {
let raw = read_to_string(path).unwrap();
let mut reader = Reader::from(raw.as_str());

View file

@ -0,0 +1,8 @@
---
source: tests/parse.rs
expression: parsed
---
{
"bar": Value("asd"),
"foo": Value("1"),
}