shithub: hugo

Download patch

ref: c34bf48560c91c8a2fa106867af7b08a569609b5
parent: 833d16d467f69988f9832849ae32c57da307dddf
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Fri May 22 06:57:25 EDT 2020

Add a test helper

--- a/hugolib/testhelpers_test.go
+++ b/hugolib/testhelpers_test.go
@@ -6,6 +6,7 @@
 	"math/rand"
 	"path/filepath"
 	"runtime"
+	"sort"
 	"strconv"
 	"testing"
 	"time"
@@ -978,6 +979,15 @@
 		panic(err)
 	}
 	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) {