Skip to content

runnableExamples doesn't work at module level #8641

Closed
@timotheecour

Description

@timotheecour
runnableExamples:
  doAssert true

proc foo*()=
  ## mydoc
  runnableExamples:
    doAssert 1==1
  discard

nim_cmd=doc rnim bugs/doc/t02_runnableExamples_toplevel2.nim
nim doc --nimcache:/tmp/nim//nimcache/ -o:/tmp/nim//app.html bugs/doc/t02_runnableExamples_toplevel2.nim
Hint: used config file '/Users/timothee/git_clone/nim/Nim/config/nim.cfg' [Conf]
Hint: used config file '/Users/timothee/.config/nim.cfg' [Conf]
Hint: [Link]
Hint: operation successful (12232 lines compiled; 0.710 sec total; 16.309MiB peakmem; Debug Build) [SuccessX]
Hint: /private/tmp/nim/nimcache/runnableExamples/t02_runnableExamples_toplevel2_examples [Exec]
Hint: operation successful: runnableExamples: /tmp/nim//nimcache/runnableExamples/t02_runnableExamples_toplevel2_examples.nim [Success]
Hint: operation successful (13716 lines compiled; 0.967 sec total; 15.82MiB peakmem; Debug Build) [SuccessX]
/tmp/nim//app.html

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions