mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Add a test helper
This commit is contained in:
parent
833d16d467
commit
c34bf48560
1 changed files with 10 additions and 0 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"math/rand"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strconv"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -980,6 +981,15 @@ func content(c resource.ContentProvider) string {
|
|||
return ccs
|
||||
}
|
||||
|
||||
func pagesToString(pages ...page.Page) string {
|
||||
var paths []string
|
||||
for _, p := range pages {
|
||||
paths = append(paths, p.Path())
|
||||
}
|
||||
sort.Strings(paths)
|
||||
return strings.Join(paths, "|")
|
||||
}
|
||||
|
||||
func dumpPages(pages ...page.Page) {
|
||||
fmt.Println("---------")
|
||||
for _, p := range pages {
|
||||
|
|
Loading…
Reference in a new issue