aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2018-11-02 14:14:15 -0500
committerGanesh Viswanathan <dev@genotrance.com>2018-11-02 14:14:15 -0500
commit34efd6619ffdb4d52047d13ca05000a75941f605 (patch)
tree113a825577bc72815dfebe608c7b4f59ba91b7a1 /tests
parent715b502274da13adb810891d7a493e4ee73ba8dc (diff)
downloadnimgen-34efd6619ffdb4d52047d13ca05000a75941f605.tar.gz
nimgen-34efd6619ffdb4d52047d13ca05000a75941f605.zip
Docgen only on Windows
Diffstat (limited to 'tests')
-rw-r--r--tests/nimgentest.nims29
1 files changed, 15 insertions, 14 deletions
diff --git a/tests/nimgentest.nims b/tests/nimgentest.nims
index 134e94b..f3ab526 100644
--- a/tests/nimgentest.nims
+++ b/tests/nimgentest.nims
@@ -40,20 +40,21 @@ for comp in comps:
exec "nimble install -y"
exec "nimble test"
- if dirExists("web"/comp):
- rmDir("web"/comp)
+ when defined(windows):
+ if dirExists("web"/comp):
+ rmDir("web"/comp)
- mkDir("web"/comp)
- for file in listFiles(".."/comp/comp) & listFiles(".."/comp):
- if file.splitFile().ext == ".nim":
- cpFile(file, "web"/comp/extractFilename(file))
-
- cpFile("web"/"nimdoc.cfg", "web"/comp/"nimdoc.cfg")
- withDir("web"/comp):
- for file in listFiles("."):
+ mkDir("web"/comp)
+ for file in listFiles(".."/comp/comp) & listFiles(".."/comp):
if file.splitFile().ext == ".nim":
- exec "nim doc --git.url:. --index:on -o:" & file.changeFileExt("html") & " " & file
- exec "pygmentize -f html -O full,linenos=1,anchorlinenos=True,lineanchors=L,style=vs -o " & file & ".html " & file
+ cpFile(file, "web"/comp/extractFilename(file))
+
+ cpFile("web"/"nimdoc.cfg", "web"/comp/"nimdoc.cfg")
+ withDir("web"/comp):
+ for file in listFiles("."):
+ if file.splitFile().ext == ".nim":
+ exec "nim doc --git.url:. --index:on -o:" & file.changeFileExt("html") & " " & file
+ exec "pygmentize -f html -O full,linenos=1,anchorlinenos=True,lineanchors=L,style=vs -o " & file & ".html " & file
- exec "nim buildIndex -o:index.html ."
- rmFile("web"/comp/"nimdoc.cfg")
+ exec "nim buildIndex -o:index.html ."
+ rmFile("web"/comp/"nimdoc.cfg")