document nimTestsNimdocFixup for rsttester (#19894)

This commit is contained in:
flywind
2022-06-16 14:46:59 +08:00
committed by GitHub
parent d33e112766
commit ef2dd2e473

View File

@@ -1,9 +1,14 @@
# To run this, cd to the git repo root, and run "nim r nimdoc/rsttester.nim".
# to change expected results (after carefully verifying everything), use -d:nimTestsNimdocFixup
import os, strutils
from std/private/gitutils import diffFiles
const
baseDir = "nimdoc/rst2html"
const fixup = defined(nimTestsNimdocFixup)
var failures = 0
proc exec(cmd: string) =
@@ -29,7 +34,7 @@ proc testRst2Html(fixup = false) =
if failures == 0:
removeDir(baseDir / "source/htmldocs")
testRst2Html(defined(fixup))
testRst2Html(fixup)
# Check for failures
if failures > 0: quit($failures & " failures occurred.")