forked from NimParsers/parsetoml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parsetoml.nimble
38 lines (32 loc) · 1.26 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
# Packages
version = "0.6.0"
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
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.
# For Travis, set "language:" to "go".
let
goPath = getEnv("GOPATH")
tomlTestRepo = "github.com/BurntSushi/toml-test"
doAssert goPath != ""
exec("go get -u -v " & tomlTestRepo)
exec((goPath / "bin" / "toml-test") & " " & "decoder/decoder")
task run_new_toml_test, "Validates parsetoml using toml-test from sgarciac":
exec("nim c -d:release -d:newtestsuite decoder/decoder.nim")
# Needs "go" executable to be present in PATH.
# For Travis, set "language:" to "go".
let
goPath = getEnv("GOPATH")
tomlTestRepo = "github.com/sgarciac/toml-test"
doAssert goPath != ""
exec("go get -u -v " & tomlTestRepo)
exec("cp -r " & (goPath / "src" / "github.com" / "sgarciac" / "toml-test") &
" " & (goPath / "src" / "github.com" / "BurntSushi" / "toml-test"))
exec((goPath / "bin" / "toml-test") & " " & "decoder/decoder")