added a test for 'nim doc'
This commit is contained in:
parent
86556ebfdb
commit
b017138c32
10 changed files with 2696 additions and 7 deletions
1299
nimdoc/testproject/expected/subdir/subdir_b/utils.html
Normal file
1299
nimdoc/testproject/expected/subdir/subdir_b/utils.html
Normal file
File diff suppressed because it is too large
Load diff
1331
nimdoc/testproject/expected/testproject.html
Normal file
1331
nimdoc/testproject/expected/testproject.html
Normal file
File diff suppressed because it is too large
Load diff
7
nimdoc/testproject/subdir/subdir_b/utils.nim
Normal file
7
nimdoc/testproject/subdir/subdir_b/utils.nim
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
type
|
||||
SomeType* = int
|
||||
|
||||
proc someType*(): SomeType =
|
||||
## constructor.
|
||||
SomeType(2)
|
||||
21
nimdoc/testproject/testproject.nim
Normal file
21
nimdoc/testproject/testproject.nim
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
import subdir / subdir_b / utils
|
||||
|
||||
## This is the top level module.
|
||||
runnableExamples:
|
||||
doAssert bar(3, 4) == 7
|
||||
foo(1, 2)
|
||||
|
||||
|
||||
template foo*(a, b: SomeType) =
|
||||
## This does nothing
|
||||
##
|
||||
discard
|
||||
|
||||
proc bar*[T](a, b: T): T =
|
||||
result = a + b
|
||||
|
||||
import std/macros
|
||||
|
||||
macro bar*(): untyped =
|
||||
result = newStmtList()
|
||||
0
nimdoc/testproject/testproject.nimble
Normal file
0
nimdoc/testproject/testproject.nimble
Normal file
Loading…
Add table
Add a link
Reference in a new issue