From c34bf48560c91c8a2fa106867af7b08a569609b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 22 May 2020 10:57:25 +0200 Subject: [PATCH] Add a test helper --- hugolib/testhelpers_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 {