run runnableExamples in the module scope (#11732) [feature]

This commit is contained in:
Timothee Cour 2019-07-22 07:22:57 -07:00 • committed by Andreas Rumpf
commit 8c93c692b9
4 changed files with 81 additions and 17 deletions

View file

@ -198,8 +198,8 @@ proc initUri*(): Uri =
## **See also:**
## * `Uri type <#Uri>`_ for available fields in the URI type
runnableExamples:
var uri: Uri
assert initUri() == uri
var uri2: Uri
assert initUri() == uri2
result = Uri(scheme: "", username: "", password: "", hostname: "", port: "",
path: "", query: "", anchor: "")