mirror of
https://github.com/gohugoio/hugo.git
synced 2025-05-10 12:47:45 +03:00
parent
0ada405912
commit
c71e1b106e
71 changed files with 2219 additions and 1731 deletions
|
@ -16,6 +16,11 @@ package hugolib
|
|||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"path/filepath"
|
||||
|
||||
"github.com/spf13/hugo/deps"
|
||||
"github.com/spf13/hugo/hugofs"
|
||||
)
|
||||
|
||||
// Issue #1123
|
||||
|
@ -23,9 +28,15 @@ import (
|
|||
// May be smart to run with: -timeout 4000ms
|
||||
func TestEncodePage(t *testing.T) {
|
||||
|
||||
fs := hugofs.NewMem()
|
||||
|
||||
// borrowed from menu_test.go
|
||||
s := createTestSite(menuPageSources)
|
||||
testSiteSetup(s, t)
|
||||
for _, src := range menuPageSources {
|
||||
writeSource(t, fs, filepath.Join("content", src.Name), string(src.Content))
|
||||
|
||||
}
|
||||
|
||||
s := buildSingleSite(t, deps.DepsCfg{Fs: fs}, BuildCfg{})
|
||||
|
||||
_, err := json.Marshal(s)
|
||||
check(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue