mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
parent
901077c036
commit
9442937d82
3 changed files with 55 additions and 27 deletions
|
@ -486,6 +486,8 @@ func (s *sitesBuilder) CreateSitesE() error {
|
|||
return errors.Wrap(err, "failed to load config")
|
||||
}
|
||||
|
||||
s.Fs.Destination = hugofs.NewCreateCountingFs(s.Fs.Destination)
|
||||
|
||||
depsCfg := s.depsCfg
|
||||
depsCfg.Fs = s.Fs
|
||||
depsCfg.Cfg = s.Cfg
|
||||
|
@ -680,6 +682,12 @@ func (s *sitesBuilder) AssertImage(width, height int, filename string) {
|
|||
s.Assert(cfg.Height, qt.Equals, height)
|
||||
}
|
||||
|
||||
func (s *sitesBuilder) AssertNoDuplicateWrites() {
|
||||
s.Helper()
|
||||
d := s.Fs.Destination.(hugofs.DuplicatesReporter)
|
||||
s.Assert(d.ReportDuplicates(), qt.Equals, "")
|
||||
}
|
||||
|
||||
func (s *sitesBuilder) FileContent(filename string) string {
|
||||
s.T.Helper()
|
||||
filename = filepath.FromSlash(filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue