From 423594e03a906ef4150f433666ff588b022c3c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 17 Mar 2022 17:22:34 +0100 Subject: dartsass: Enable deprecation, @warn and @debug logging * @warn and Sass deprecations are printed as WARN * @debug is currently logged as INFO (needs the `--verbose` flag). We may adjust this if it gets too chatty. Fixes #9683 --- hugolib/integrationtest_builder.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hugolib') diff --git a/hugolib/integrationtest_builder.go b/hugolib/integrationtest_builder.go index 1bfa194bd..d49e29763 100644 --- a/hugolib/integrationtest_builder.go +++ b/hugolib/integrationtest_builder.go @@ -6,6 +6,7 @@ import ( "io" "os" "path/filepath" + "regexp" "strings" "sync" "testing" @@ -98,6 +99,12 @@ func (s *IntegrationTestBuilder) AssertLogContains(text string) { s.Assert(s.logBuff.String(), qt.Contains, text) } +func (s *IntegrationTestBuilder) AssertLogMatches(expression string) { + s.Helper() + re := regexp.MustCompile(expression) + s.Assert(re.MatchString(s.logBuff.String()), qt.IsTrue, qt.Commentf(s.logBuff.String())) +} + func (s *IntegrationTestBuilder) AssertBuildCountData(count int) { s.Helper() s.Assert(s.H.init.data.InitCount(), qt.Equals, count) -- cgit v1.2.3