mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
20 lines
421 B
Go
20 lines
421 B
Go
![]() |
package hugolib
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
"path/filepath"
|
||
|
)
|
||
|
|
||
|
func TestDegenerateMissingFolderInPageFilename(t *testing.T) {
|
||
|
p := NewPage(filepath.Join("foobar"))
|
||
|
if p != nil {
|
||
|
t.Fatalf("Creating a new Page without a subdirectory should result in nil page")
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func TestSettingOutFileOnPageContainsCorrectSlashes(t *testing.T) {
|
||
|
s := NewSite(&Config{})
|
||
|
p := NewPage(filepath.Join("sub", "foobar"))
|
||
|
s.setOutFile(p)
|
||
|
}
|