v2 / vlib / toml / tests / large_toml_file_test.v
20 lines · 17 sloc · 716 bytes · e2e5cf8db56f3562c7baa735061690be936bdf3e
Raw
1import os
2import toml
3
4// Instructions for developers:
5// The large (1MB) TOML file can be obtained by doing:
6// `wget https://gist.githubusercontent.com/Larpon/89b0e3d94c6903851ff15559e5df7a05/raw/62a1f87a4e37bf157f2e0bfb32d85d840c98e422/large_toml_file_test.toml`
7// `mv large_toml_file_test.toml vlib/toml/tests/testdata/`
8
9const toml_file = os.join_path_single(@VEXEROOT,
10 'vlib/toml/tests/testdata/large_toml_file_test.toml')
11
12fn test_large_file() {
13 if !os.exists(toml_file) {
14 eprintln('skipping ${@FILE} since ${toml_file} is missing.')
15 return
16 }
17 println('Testing parsing of large (${os.file_size(toml_file)} bytes) "${toml_file}"...')
18 doc := toml.parse_file(toml_file) or { panic(err) }
19 assert true
20}
21