2 Commits

Author SHA1 Message Date
e09cc3f2d7 Merge pull request 'fixed tests case' (#9) from release/0.4.0 into main
All checks were successful
Release / Build and Release (push) Successful in 53s
Reviewed-on: #9
2026-03-17 12:39:27 +01:00
f09dbc8321 fixed tests case 2026-03-17 12:39:18 +01:00
2 changed files with 9 additions and 6 deletions

View File

@@ -9,15 +9,16 @@ transparent = false
# Colors are specified in hex format ("#RRGGBB"). # Colors are specified in hex format ("#RRGGBB").
# Default values follow the Semantic Catppuccin Mocha palette. # Default values follow the Semantic Catppuccin Mocha palette.
bg_normal = "#11111b" bg_normal = "#1e1e2e"
bg_highlight = "#89b4fa" bg_highlight = "#89b4fa"
bg_active = "#a6e3a1" bg_active = "#a6e3a1"
bg_search = "#cba6f7" bg_search = "#cba6f7"
fg_normal = "#cdd6f4" fg_normal = "#cdd6f4"
fg_dimmed = "#a6adc8" fg_dimmed = "#6c7086"
fg_highlight = "#11111b" fg_highlight = "#1e1e2e"
fg_warning = "#f38ba8" fg_warning = "#f38ba8"
fg_modified = "#fab387" fg_modified = "#fab387"
fg_accent = "#b4befe"
border_normal = "#45475a" border_normal = "#45475a"
border_active = "#a6e3a1" border_active = "#a6e3a1"
tree_depth_1 = "#b4befe" tree_depth_1 = "#b4befe"

View File

@@ -310,12 +310,14 @@ mod tests {
} }
}); });
flatten(&json, "", &mut vars); flatten(&json, "", 0, "", &mut vars);
assert_eq!(vars.len(), 2); assert_eq!(vars.len(), 6);
let mut root = Value::Object(Map::new()); let mut root = Value::Object(Map::new());
for var in vars { for var in vars {
insert_into_value(&mut root, &var.key, &var.value); if !var.is_group {
insert_into_value(&mut root, &var.path, var.value.as_deref().unwrap_or(""));
}
} }
// When unflattening, it parses bool back // When unflattening, it parses bool back