Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Jan 30, 2022
1 parent 1118401 commit 3d63d5b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/stdlib/trst.nim
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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.
Expand Down Expand Up @@ -866,7 +866,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":
Expand All @@ -880,7 +880,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":
Expand All @@ -894,7 +894,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")


Expand All @@ -912,7 +912,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")


Expand All @@ -932,7 +932,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":
Expand Down

0 comments on commit 3d63d5b

Please sign in to comment.