hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit c34bf48560c91c8a2fa106867af7b08a569609b5
parent 833d16d467f69988f9832849ae32c57da307dddf
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Fri, 22 May 2020 10:57:25 +0200

Add a test helper

Diffstat:
Mhugolib/testhelpers_test.go | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git 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 {