mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-24 08:15:25 +00:00
fix broken CI (#19472)
* fix broken CI
* fix
* fix tests
(cherry picked from commit 56a901f9e1)
This commit is contained in:
@@ -25,7 +25,7 @@ import std/private/miscdollars
|
||||
import os
|
||||
|
||||
proc toAst(input: string,
|
||||
rstOptions: RstParseOptions = {roPreferMarkdown, roSupportMarkdown, roNimFile},
|
||||
rstOptions: RstParseOptions = {roPreferMarkdown, roSupportMarkdown, roNimFile, roSandboxDisabled},
|
||||
error: ref string = nil,
|
||||
warnings: ref seq[string] = nil): string =
|
||||
## If `error` is nil then no errors should be generated.
|
||||
@@ -408,7 +408,7 @@ suite "RST include directive":
|
||||
test "Include whole":
|
||||
"other.rst".writeFile("**test1**")
|
||||
let input = ".. include:: other.rst"
|
||||
doAssert "<strong>test1</strong>" == rstTohtml(input, {}, defaultConfig())
|
||||
doAssert "<strong>test1</strong>" == rstTohtml(input, {roSandboxDisabled}, defaultConfig())
|
||||
removeFile("other.rst")
|
||||
|
||||
test "Include starting from":
|
||||
@@ -422,7 +422,7 @@ OtherStart
|
||||
.. include:: other.rst
|
||||
:start-after: OtherStart
|
||||
"""
|
||||
check "<em>Visible</em>" == rstTohtml(input, {}, defaultConfig())
|
||||
check "<em>Visible</em>" == rstTohtml(input, {roSandboxDisabled}, defaultConfig())
|
||||
removeFile("other.rst")
|
||||
|
||||
test "Include everything before":
|
||||
@@ -436,7 +436,7 @@ And this should **NOT** be visible in `docs.html`
|
||||
.. include:: other.rst
|
||||
:end-before: OtherEnd
|
||||
"""
|
||||
doAssert "<em>Visible</em>" == rstTohtml(input, {}, defaultConfig())
|
||||
doAssert "<em>Visible</em>" == rstTohtml(input, {roSandboxDisabled}, defaultConfig())
|
||||
removeFile("other.rst")
|
||||
|
||||
|
||||
@@ -454,7 +454,7 @@ And this should **NOT** be visible in `docs.html`
|
||||
:start-after: OtherStart
|
||||
:end-before: OtherEnd
|
||||
"""
|
||||
check "<em>Visible</em>" == rstTohtml(input, {}, defaultConfig())
|
||||
check "<em>Visible</em>" == rstTohtml(input, {roSandboxDisabled}, defaultConfig())
|
||||
removeFile("other.rst")
|
||||
|
||||
|
||||
@@ -474,7 +474,7 @@ And this should **NOT** be visible in `docs.html`
|
||||
:start-after: OtherStart
|
||||
:end-before: OtherEnd
|
||||
"""
|
||||
doAssert "<em>Visible</em>" == rstTohtml(input, {}, defaultConfig())
|
||||
doAssert "<em>Visible</em>" == rstTohtml(input, {roSandboxDisabled}, defaultConfig())
|
||||
removeFile("other.rst")
|
||||
|
||||
suite "RST escaping":
|
||||
|
||||
Reference in New Issue
Block a user