]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
Improve assertions
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 21 Jan 2025 18:19:20 +0000 (19:19 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 22 Jan 2025 08:44:26 +0000 (09:44 +0100)
markup/goldmark/goldmark_integration_test.go

index 356e601531e01b89a75f132f5a7391f1069e0607..faccf15ac4f0cf91ea7d03cc444f2e70d5ff1943 100644 (file)
@@ -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")
 }