v / vlib / toml / tests / array_of_tables_edge_case_2_test.v
15 lines · 11 sloc · 398 bytes · f6844e97661d55094833fd8a0e44589aeca62ebf
Raw
1import os
2import toml
3import toml.to
4
5const fprefix = os.join_path(os.dir(@FILE), 'testdata', os.file_name(@FILE).all_before_last('.'))
6
7fn test_array_of_tables_edge_case_file() {
8 toml_doc := toml.parse_file(os.real_path(fprefix + '.toml'))!
9
10 toml_json := to.json(toml_doc)
11
12 out_file_json := os.read_file(os.real_path(fprefix + '.out'))!
13 println(toml_json)
14 assert toml_json == out_file_json
15}
16