2022-03-11 13:28:28 +00:00
|
|
|
import
|
2023-02-08 01:19:55 +00:00
|
|
|
unittest2,
|
2022-03-11 13:28:28 +00:00
|
|
|
../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)
|
|
|
|
|