2021-12-02 12:19:45 +03:00
|
|
|
import os
|
|
|
|
import toml
|
|
|
|
import toml.to
|
|
|
|
|
2022-03-19 00:32:06 +03:00
|
|
|
const fprefix = os.join_path(os.dir(@FILE), 'testdata', os.file_name(@FILE).all_before_last('.'))
|
|
|
|
|
2022-09-21 19:45:43 +03:00
|
|
|
fn test_array_of_tables_edge_case_file() {
|
2022-10-16 09:28:57 +03:00
|
|
|
toml_doc := toml.parse_file(os.real_path(fprefix + '.toml'))!
|
2021-12-02 12:19:45 +03:00
|
|
|
|
|
|
|
toml_json := to.json(toml_doc)
|
2022-03-19 00:32:06 +03:00
|
|
|
|
2022-10-16 09:28:57 +03:00
|
|
|
out_file_json := os.read_file(os.real_path(fprefix + '.out'))!
|
2021-12-02 12:19:45 +03:00
|
|
|
println(toml_json)
|
|
|
|
assert toml_json == out_file_json
|
|
|
|
}
|