mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 14:55:24 +00:00
fix code-block test bugs: fix #17183, fix https://github.com/timotheecour/Nim/issues/620 (#17184)
* fix code-block test bugs: fix #17183, fix https://github.com/timotheecour/Nim/issues/620 * cleanup
This commit is contained in:
@@ -920,8 +920,11 @@ proc parseCodeBlockField(d: PDoc, n: PRstNode, params: var CodeBlockParams) =
|
||||
of "test":
|
||||
params.testCmd = n.getFieldValue.strip
|
||||
if params.testCmd.len == 0:
|
||||
params.testCmd = "$nim r --backend:$backend $options" # see `interpSnippetCmd`
|
||||
# factor with D20210224T221756. Note that `$docCmd` should appear before `$file`
|
||||
# but after all other options, but currently `$options` merges both options and `$file` so it's tricky.
|
||||
params.testCmd = "$nim r --backend:$backend --lib:$libpath $docCmd $options"
|
||||
else:
|
||||
# consider whether `$docCmd` should be appended here too
|
||||
params.testCmd = unescape(params.testCmd)
|
||||
of "status", "exitcode":
|
||||
var status: int
|
||||
|
||||
Reference in New Issue
Block a user