summaryrefslogtreecommitdiffstats
path: root/hugolib/integrationtest_builder.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-02-29 19:05:23 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-03-01 14:18:52 +0100
commit0d6e593ffb65a67206caa3c3071d94694cfc2183 (patch)
tree0ee6049b860bab29456152d0096e6869b66205b5 /hugolib/integrationtest_builder.go
parent7023cf0f07d07bd943404d88d5fc8f3c5f7c9cc2 (diff)
Fix and add integration test for the Bootstrap SCSS module for both Dart Sass and Libsass
This fixes the reverse filesystem lookup (absolute filename to path relative to the composite filesystem). The old logic had some assumptions about the locality of the actual files that didn't work in more complex scenarios. This commit now also adds the popular Bootstrap SCSS Hugo module to the CI build (both for libsass and dartsass transpiler), so we can hopefully avoid similar future breakage. Fixes #12178
Diffstat (limited to 'hugolib/integrationtest_builder.go')
-rw-r--r--hugolib/integrationtest_builder.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/hugolib/integrationtest_builder.go b/hugolib/integrationtest_builder.go
index 642bac7ab..be11c18d6 100644
--- a/hugolib/integrationtest_builder.go
+++ b/hugolib/integrationtest_builder.go
@@ -183,6 +183,13 @@ type lockingBuffer struct {
bytes.Buffer
}
+func (b *lockingBuffer) ReadFrom(r io.Reader) (n int64, err error) {
+ b.Lock()
+ n, err = b.Buffer.ReadFrom(r)
+ b.Unlock()
+ return
+}
+
func (b *lockingBuffer) Write(p []byte) (n int, err error) {
b.Lock()
n, err = b.Buffer.Write(p)