mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018 The Hugo Authors. All rights reserved.
|
||||
// Copyright 2024 The Hugo Authors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@@ -234,6 +234,7 @@ foo
|
||||
b := hugolib.Test(t, files)
|
||||
bfs := b.H.BaseFs
|
||||
watchFilenames := bfs.WatchFilenames()
|
||||
// []string{"/hugo_stats.json", "/content", "/content2", "/themes/t1/layouts", "/themes/t1/layouts/_default", "/themes/t1/static"}
|
||||
b.Assert(watchFilenames, qt.HasLen, 6)
|
||||
}
|
||||
|
||||
@@ -543,6 +544,30 @@ files/f2.txt false
|
||||
`)
|
||||
}
|
||||
|
||||
func TestMountIssue12141(t *testing.T) {
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
disableKinds = ["taxonomy", "term"]
|
||||
[module]
|
||||
[[module.mounts]]
|
||||
source = "myfiles"
|
||||
target = "static"
|
||||
[[module.mounts]]
|
||||
source = "myfiles/f1.txt"
|
||||
target = "static/f2.txt"
|
||||
-- myfiles/f1.txt --
|
||||
f1
|
||||
`
|
||||
b := hugolib.Test(t, files)
|
||||
fs := b.H.BaseFs.StaticFs("")
|
||||
|
||||
b.AssertFs(fs, `
|
||||
. true
|
||||
f1.txt false
|
||||
f2.txt false
|
||||
`)
|
||||
}
|
||||
|
||||
func checkFileCount(fs afero.Fs, dirname string, c *qt.C, expected int) {
|
||||
c.Helper()
|
||||
count, names, err := countFilesAndGetFilenames(fs, dirname)
|
||||
|
Reference in New Issue
Block a user