2021-11-13 10:17:35 +01:00
|
|
|
import toml
|
|
|
|
|
|
|
|
fn test_quoted_keys() {
|
|
|
|
str_value := 'V rocks!'
|
|
|
|
toml_txt := 'a."b.c" = "V rocks!"'
|
2022-03-18 22:32:06 +01:00
|
|
|
toml_doc := toml.parse_text(toml_txt) or { panic(err) }
|
2021-11-13 10:17:35 +01:00
|
|
|
|
|
|
|
value := toml_doc.value('a."b.c"')
|
|
|
|
assert value == toml.Any(str_value)
|
|
|
|
assert value as string == str_value
|
|
|
|
assert value.string() == str_value
|
|
|
|
}
|