mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
Improve assertions
This commit is contained in:
parent
637995ba8f
commit
91101d24f2
1 changed files with 11 additions and 2 deletions
|
@ -912,10 +912,19 @@ hidden
|
|||
|
||||
b := hugolib.Test(t, files, hugolib.TestOptWarn())
|
||||
|
||||
b.AssertFileContent("public/p1/index.html", "! <!-- raw HTML omitted -->")
|
||||
b.AssertFileContent("public/p1/index.html",
|
||||
"! <!-- raw HTML omitted -->",
|
||||
"! <!-- hidden -->",
|
||||
"! <!-- This is a comment -->",
|
||||
"! script",
|
||||
)
|
||||
b.AssertLogContains("! Raw HTML omitted")
|
||||
|
||||
b = hugolib.Test(t, strings.ReplaceAll(files, "markup.goldmark.renderer.unsafe = false", "markup.goldmark.renderer.unsafe = true"), hugolib.TestOptWarn())
|
||||
b.AssertFileContent("public/p1/index.html", "<!-- This is a comment -->")
|
||||
b.AssertFileContent("public/p1/index.html",
|
||||
"! <!-- raw HTML omitted -->",
|
||||
"<!-- hidden -->",
|
||||
"<!-- This is a comment -->",
|
||||
)
|
||||
b.AssertLogContains("! WARN")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue