Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-01-27 20:03:06 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-01-27 21:13:34 +0300
commit4eb2fec67c3a72a3ac98aa834dc56fd4504626d8 (patch)
tree80cfebc9fdc0e488b72e6ae2f3a6958953d0c2a1 /source/fileInfo_test.go
parent83c761b71a980aee6331179b271c7e24e999e8eb (diff)
Fix handling of top-level page bundles
Fixes #4332
Diffstat (limited to 'source/fileInfo_test.go')
-rw-r--r--source/fileInfo_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/fileInfo_test.go b/source/fileInfo_test.go
index 8ce8c16ef..1b9b130e4 100644
--- a/source/fileInfo_test.go
+++ b/source/fileInfo_test.go
@@ -34,10 +34,15 @@ func TestFileInfo(t *testing.T) {
assert.Equal(filepath.FromSlash("/a/b/page.md"), f.Filename())
assert.Equal(filepath.FromSlash("b/"), f.Dir())
assert.Equal(filepath.FromSlash("b/page.md"), f.Path())
+ assert.Equal("b", f.Section())
+
+ }},
+ {filepath.FromSlash("/a/"), filepath.FromSlash("/a/b/c/d/page.md"), func(f *FileInfo) {
+ assert.Equal("b", f.Section())
}},
} {
- f := s.NewFileInfo(this.base, this.filename, nil)
+ f := s.NewFileInfo(this.base, this.filename, false, nil)
this.assert(f)
}