summary refs log tree commit diff stats
path: root/nimdoc
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2022-06-16 14:46:59 +0800
committerGitHub <noreply@github.com>2022-06-16 08:46:59 +0200
commitef2dd2e473d7082d60088ece05beef81062850bb (patch)
treea88cfc2fc52c8f535e194b4e4d594c3a4554bf7f /nimdoc
parentd33e1127666be23ad2dc879c2f89a41c179e2093 (diff)
downloadNim-ef2dd2e473d7082d60088ece05beef81062850bb.tar.gz
document nimTestsNimdocFixup for rsttester (#19894)
Diffstat (limited to 'nimdoc')
-rw-r--r--nimdoc/rsttester.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/nimdoc/rsttester.nim b/nimdoc/rsttester.nim
index daca3dfc7..a0bdfca1e 100644
--- a/nimdoc/rsttester.nim
+++ b/nimdoc/rsttester.nim
@@ -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.")