-
Notifications
You must be signed in to change notification settings - Fork 13
/
parsetoml.nimble
83 lines (77 loc) · 3.13 KB
/
parsetoml.nimble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Packages
version = "0.7.1"
author = "Maurizio Tomasi <ziotom78 .at. gmail.com>"
description = "Toml parser library for Nim"
license = "MIT"
srcDir = "src"
skipDirs = @["decoder"]
# Deps
requires "nim >= 0.18.0"
from os import `/`, expandTilde
from strutils import `%`
task run_toml_test, "Validates parsetoml using toml-test":
exec("nim c -d:release decoder/decoder.nim")
# Needs "go" executable to be present in PATH.
# In GHA, add "- uses: actions/setup-go@v2"
let
tomlTestRepo = "github.com/BurntSushi/toml-test/cmd/toml-test@master"
exec("go get -u -v " & tomlTestRepo)
exec("toml-test decoder/decoder")
# https://github.com/NimParsers/parsetoml/issues/40
# FIXME: Delete below task once above issue is fixed
# i.e. parsetoml starts supporting TOML v1.0.0.
task run_toml_test_with_skips, "Validates parsetoml using toml-test (with test skips)":
exec("nim c -d:release decoder/decoder.nim")
# Needs "go" executable to be present in PATH.
# In GHA, add "- uses: actions/setup-go@v2"
let
tomlTestRepo = "github.com/BurntSushi/toml-test/cmd/toml-test@master"
exec("go get -u -v " & tomlTestRepo)
exec("toml-test" &
" -skip valid/array" &
" -skip valid/array-bool" &
" -skip valid/array-empty" &
" -skip valid/array-hetergeneous" &
" -skip valid/array-mixed-int-array" &
" -skip valid/array-mixed-int-float" &
" -skip valid/array-mixed-int-string" &
" -skip valid/array-mixed-string-table" &
" -skip valid/array-nested-double" &
" -skip valid/array-nested" &
" -skip valid/array-nospaces" &
" -skip valid/array-string-quote-comma-2" &
" -skip valid/array-string-quote-comma" &
" -skip valid/array-string-with-comma" &
" -skip valid/array-strings" &
" -skip valid/comment-everywhere" &
" -skip valid/comment-tricky" &
" -skip valid/datetime-local-date" &
" -skip valid/datetime-local-time" &
" -skip valid/example" &
" -skip valid/float-inf-and-nan" &
" -skip valid/float-zero" &
" -skip valid/inline-table-key-dotted" &
" -skip valid/inline-table-nest" &
" -skip valid/multiline-string-quotes" &
" -skip valid/multiline-string" &
" -skip valid/spec-example-1-compact" &
" -skip valid/spec-example-1" &
" -skip invalid/array-missing-separator" &
" -skip invalid/array-of-tables-1" &
" -skip invalid/duplicate-table-array2" &
" -skip invalid/encoding-bad-utf8-in-comment" &
" -skip invalid/encoding-bad-utf8-in-string" &
" -skip invalid/encoding-utf16" &
" -skip invalid/inline-table-double-comma" &
" -skip invalid/inline-table-no-comma" &
" -skip invalid/inline-table-trailing-comma" &
" -skip invalid/integer-double-sign-nex" &
" -skip invalid/integer-double-sign-plus" &
" -skip invalid/integer-leading-zero-sign-1" &
" -skip invalid/integer-leading-zero-sign-2" &
" -skip invalid/key-multiline" &
" -skip invalid/string-bad-multiline" &
" -skip invalid/string-multiline-escape-space" &
" -skip invalid/string-multiline-escape-space" &
" -skip valid/float-exponent" & # https://github.com/NimParsers/parsetoml/issues/51
" decoder/decoder")