mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
@@ -18,6 +18,8 @@ import (
|
||||
"html/template"
|
||||
"os"
|
||||
|
||||
"github.com/gohugoio/hugo/common/loggers"
|
||||
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -1166,6 +1168,12 @@ Content:{{ .Content }}
|
||||
|
||||
}
|
||||
|
||||
// https://github.com/gohugoio/hugo/issues/5781
|
||||
func TestPageWithZeroFile(t *testing.T) {
|
||||
newTestSitesBuilder(t).WithLogger(loggers.NewWarningLogger()).WithSimpleConfigFile().
|
||||
WithTemplatesAdded("index.html", "{{ .File.Filename }}{{ with .File }}{{ .Dir }}{{ end }}").Build(BuildCfg{})
|
||||
}
|
||||
|
||||
func TestShouldBuild(t *testing.T) {
|
||||
t.Parallel()
|
||||
var past = time.Date(2009, 11, 17, 20, 34, 58, 651387237, time.UTC)
|
||||
|
Reference in New Issue
Block a user