summaryrefslogtreecommitdiffstats
path: root/markup
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2025-01-21 19:19:20 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2025-01-22 09:44:26 +0100
commit91101d24f23255a45f0bb0e5eb8aeeba819e20a4 (patch)
tree9bb88a5cfeebb14e2f9bbef5deecd0bd35257d1d /markup
parent637995ba8f14d3100d2ef185489836d3dd19165c (diff)
downloadhugo-91101d24f23255a45f0bb0e5eb8aeeba819e20a4.tar.gz
hugo-91101d24f23255a45f0bb0e5eb8aeeba819e20a4.zip
Improve assertions
Diffstat (limited to 'markup')
-rw-r--r--markup/goldmark/goldmark_integration_test.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/markup/goldmark/goldmark_integration_test.go b/markup/goldmark/goldmark_integration_test.go
index 356e60153..faccf15ac 100644
--- a/markup/goldmark/goldmark_integration_test.go
+++ b/markup/goldmark/goldmark_integration_test.go
@@ -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")
}