From b017138c32df2df2799ebb480bf1b8f5a461d300 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 7 Sep 2018 13:13:35 +0200 Subject: added a test for 'nim doc' --- .../expected/subdir/subdir_b/utils.html | 1299 +++++++++++++++++++ nimdoc/testproject/expected/testproject.html | 1331 ++++++++++++++++++++ nimdoc/testproject/subdir/subdir_b/utils.nim | 7 + nimdoc/testproject/testproject.nim | 21 + nimdoc/testproject/testproject.nimble | 0 5 files changed, 2658 insertions(+) create mode 100644 nimdoc/testproject/expected/subdir/subdir_b/utils.html create mode 100644 nimdoc/testproject/expected/testproject.html create mode 100644 nimdoc/testproject/subdir/subdir_b/utils.nim create mode 100644 nimdoc/testproject/testproject.nim create mode 100644 nimdoc/testproject/testproject.nimble (limited to 'nimdoc/testproject') diff --git a/nimdoc/testproject/expected/subdir/subdir_b/utils.html b/nimdoc/testproject/expected/subdir/subdir_b/utils.html new file mode 100644 index 000000000..0e09b10cd --- /dev/null +++ b/nimdoc/testproject/expected/subdir/subdir_b/utils.html @@ -0,0 +1,1299 @@ + + + + + + + + + + + + + + + + + +Module utils + + + + + + + + +
+
+

Module utils

+
+
+ +
+ Search: +
+
+ Group by: + +
+ + +
+
+
+

+
+

Types

+
+
SomeType = int
+
+ + +
+ +
+
+

Procs

+
+
proc someType(): SomeType {...}{.raises: [], tags: [].}
+
+constructor. + +
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html new file mode 100644 index 000000000..b1f8489f1 --- /dev/null +++ b/nimdoc/testproject/expected/testproject.html @@ -0,0 +1,1331 @@ + + + + + + + + + + + + + + + + + +Module testproject + + + + + + + + +
+
+

Module testproject

+
+
+ +
+ Search: +
+
+ Group by: + +
+ + +
+
+
+

This is the top level module. +

Examples:

+
doAssert bar(3, 4) == 7
+foo(1, 2)

+ +
+

Procs

+
+
proc bar[T](a, b: T): T
+
+ + +
+ +
+
+

Macros

+
+
macro bar(): untyped
+
+ + +
+ +
+
+

Templates

+
+
template foo(a, b: SomeType)
+
+This does nothing + +
+ +
+ +
+
+ +
+ +
+
+
+ + + diff --git a/nimdoc/testproject/subdir/subdir_b/utils.nim b/nimdoc/testproject/subdir/subdir_b/utils.nim new file mode 100644 index 000000000..31e066751 --- /dev/null +++ b/nimdoc/testproject/subdir/subdir_b/utils.nim @@ -0,0 +1,7 @@ + +type + SomeType* = int + +proc someType*(): SomeType = + ## constructor. + SomeType(2) diff --git a/nimdoc/testproject/testproject.nim b/nimdoc/testproject/testproject.nim new file mode 100644 index 000000000..697a2ab3c --- /dev/null +++ b/nimdoc/testproject/testproject.nim @@ -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() diff --git a/nimdoc/testproject/testproject.nimble b/nimdoc/testproject/testproject.nimble new file mode 100644 index 000000000..e69de29bb -- cgit 1.4.1-2-gfad0