Fix a test using obsolete pragmas

This commit is contained in:
Zahary Karadjov 2020-03-24 17:31:05 +02:00
parent 24c73359b0
commit d5bcca04da
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
3 changed files with 27 additions and 4 deletions

View File

@ -7,6 +7,13 @@ description = "Simplified handling of command line options and config files"
license = "Apache License 2.0"
skipDirs = @["tests"]
requires "nim >= 0.19.0",
"stew"
requires "nim >= 1.0.0",
"stew",
"testutils"
task test, "run CPU tests":
when defined(windows):
exec "cmd.exe /C testrunner.cmd tests"
else:
exec "testrunner tests"

16
tests/logger.nim Normal file
View File

@ -0,0 +1,16 @@
import
../confutils
type
Command = enum
pubsub = "A pub sub command"
Conf = object
logDir: string
case cmd {.command.}: Command
of pubsub:
foo: string
let c = load Conf
echo c.cmd

View File

@ -22,7 +22,7 @@ type
commonOptional: Option[string]
commonMandatory {.
desc: "A mandatory option"
shortform: "m" .}: int
abbr: "m" .}: int
case opt: OuterOpt
of outerOpt1:
@ -42,7 +42,7 @@ type
ic1Mandatory: string
ic1Optional {.
desc: "Delay in seconds"
shortform: "s" .}: Option[int]
abbr: "s" .}: Option[int]
else:
discard
of outerCmd2: