diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-05-22 10:57:25 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-05-22 10:57:25 +0200 |
commit | c34bf48560c91c8a2fa106867af7b08a569609b5 (patch) | |
tree | b57344ef38fe64727a5d6911a39ba57a01ab0c24 | |
parent | 833d16d467f69988f9832849ae32c57da307dddf (diff) |
Add a test helper
-rw-r--r-- | hugolib/testhelpers_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hugolib/testhelpers_test.go b/hugolib/testhelpers_test.go index 2815c6d99..67e2caee9 100644 --- a/hugolib/testhelpers_test.go +++ b/hugolib/testhelpers_test.go @@ -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 { |