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:
parent
c7d6e4c6a6
commit
ff3ace2232
3 changed files with 21 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue