2021-11-02 18:07:27 +01:00
|
|
|
import toml
|
|
|
|
|
|
|
|
fn test_crlf() {
|
|
|
|
str_value := 'test string'
|
2021-11-29 21:15:22 +01:00
|
|
|
mut toml_txt := 'crlf_string = "test string"\r\n
|
|
|
|
# Comment with CRLF is not allowed'
|
2021-11-02 18:07:27 +01:00
|
|
|
toml_doc := toml.parse(toml_txt) or { panic(err) }
|
|
|
|
|
|
|
|
value := toml_doc.value('crlf_string')
|
|
|
|
assert value == toml.Any(str_value)
|
|
|
|
assert value as string == str_value
|
|
|
|
assert value.string() == str_value
|
|
|
|
}
|