* fix #16256: nimout: <empty> should give error (vacuously true); improve some tests * renamed: tests/stdlib/t9710.nim -> tests/misc/t9710.nim * improve tests * fix non-DRY tests * improve $nim_prs_D/tests/stdlib/t9091.nim * renamed: tests/stdlib/t9091.nim -> tests/misc/t9091.nim * fixup * address comment: doAssert => result.parseErrors
This commit is contained in:
parent
b7ad29e692
commit
a36efb59b5
7 changed files with 73 additions and 106 deletions
|
|
@ -253,6 +253,7 @@ proc parseSpec*(filename: string): TSpec =
|
|||
var p: CfgParser
|
||||
open(p, ss, filename, 1)
|
||||
var flags: HashSet[string]
|
||||
var nimoutFound = false
|
||||
while true:
|
||||
var e = next(p)
|
||||
case e.kind
|
||||
|
|
@ -309,6 +310,7 @@ proc parseSpec*(filename: string): TSpec =
|
|||
result.action = actionReject
|
||||
of "nimout":
|
||||
result.nimout = e.value
|
||||
nimoutFound = true
|
||||
of "nimoutfull":
|
||||
result.nimoutFull = parseCfgBool(e.value)
|
||||
of "batchable":
|
||||
|
|
@ -401,6 +403,9 @@ proc parseSpec*(filename: string): TSpec =
|
|||
if skips.anyIt(it in result.file):
|
||||
result.err = reDisabled
|
||||
|
||||
if nimoutFound and result.nimout.len == 0 and not result.nimoutFull:
|
||||
result.parseErrors.addLine "empty `nimout` is vacuously true, use `nimoutFull:true` if intentional"
|
||||
|
||||
result.inCurrentBatch = isCurrentBatch(testamentData0, filename) or result.unbatchable
|
||||
if not result.inCurrentBatch:
|
||||
result.err = reDisabled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue