nim-confutils/tests/test_pragma.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

28 lines
656 B
Nim

import
unittest2,
../confutils,
../confutils/defs
{.pragma: customPragma, hidden.}
type
TestConf* = object
statusBarEnabled* {.
customPragma
desc: "Display a status bar at the bottom of the terminal screen"
defaultValue: true
name: "status-bar" }: bool
statusBarEnabled2* {.
customPragma
desc: "Display a status bar at the bottom of the terminal screen"
defaultValue: true
name: "status-bar2" }: bool
suite "test custom pragma":
test "funny AST when called twice":
let conf = TestConf.load()
doAssert(conf.statusBarEnabled == true)
doAssert(conf.statusBarEnabled2 == true)