dont attempt to deserialize bracketed strings as arrays if they contain more brackets

This commit is contained in:
Robin Appelman 2026-01-03 16:05:51 +01:00
commit 842cf2407c
7 changed files with 22 additions and 4 deletions

View file

@ -43,6 +43,7 @@ enum Expected {
empty: (),
array: Vec<u32>,
windows_path: String,
bracket_string: String,
#[serde(rename = r#"\\"$translucent""#)]
translucent: bool,
#[serde(rename = "$envmaptint")]
@ -255,7 +256,6 @@ fn test_serde_table(path: &str) {
fn test_serde_from_table(path: &str) {
let raw = read_to_string(path).unwrap();
let result = Table::load_from_str(&raw).unwrap();
dbg!(&result);
let material: Expected = from_entry(result.into()).expect("table to material");
insta::assert_ron_snapshot!(format!("table_to_material__{}", path), material);