nim-confutils/tests/test_ignore.nim
jangko a1f3b22bbe
fix ci for nim 1.6 and devel
- rm -f nimble.lock to allow nim 1.2,1.4,1.6, and devel run test with nimble
- upgrade ubuntu runner to 20.04
- upgrade github actions to v3
2023-02-12 13:05:41 +07:00

23 lines
466 B
Nim

import
unittest2,
../confutils,
../confutils/defs
type
TestConf* = object
dataDir* {.
ignore
defaultValue: "nimbus"
name: "data-dir"}: string
logLevel* {.
defaultValue: "DEBUG"
desc: "Sets the log level."
name: "log-level" }: string
suite "test ignore option":
test "ignored option have no default value":
let conf = TestConf.load()
doAssert(conf.logLevel == "DEBUG")
doAssert(conf.dataDir == "")