diff options
Diffstat (limited to 'resources/resource_transformers/tocss/scss/scss_integration_test.go')
-rw-r--r-- | resources/resource_transformers/tocss/scss/scss_integration_test.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/resources/resource_transformers/tocss/scss/scss_integration_test.go b/resources/resource_transformers/tocss/scss/scss_integration_test.go index c193ca8af..02e2b9200 100644 --- a/resources/resource_transformers/tocss/scss/scss_integration_test.go +++ b/resources/resource_transformers/tocss/scss/scss_integration_test.go @@ -327,3 +327,34 @@ Styles: {{ $r.RelPermalink }} b.AssertFileContent("public/index.html", "Styles: /scss/main.css") } + +func TestRebuildAssetGetMatch(t *testing.T) { + t.Parallel() + if !scss.Supports() { + t.Skip() + } + + files := ` +-- assets/scss/main.scss -- +b { + color: red; +} +-- layouts/index.html -- +{{ $r := resources.GetMatch "scss/main.scss" | toCSS }} +T1: {{ $r.Content }} + ` + + b := hugolib.NewIntegrationTestBuilder( + hugolib.IntegrationTestConfig{ + T: t, + TxtarString: files, + NeedsOsFS: true, + Running: true, + }).Build() + + b.AssertFileContent("public/index.html", `color: red`) + + b.EditFiles("assets/scss/main.scss", `b { color: blue; }`).Build() + + b.AssertFileContent("public/index.html", `color: blue`) +} |