summaryrefslogtreecommitdiffstats
path: root/hugolib/testhelpers_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/testhelpers_test.go')
-rw-r--r--hugolib/testhelpers_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/hugolib/testhelpers_test.go b/hugolib/testhelpers_test.go
index 469cfeb4a..f80f40c48 100644
--- a/hugolib/testhelpers_test.go
+++ b/hugolib/testhelpers_test.go
@@ -4,7 +4,9 @@ import (
"io/ioutil"
"path/filepath"
"runtime"
+ "strconv"
"testing"
+ "unicode/utf8"
"bytes"
"fmt"
@@ -698,6 +700,26 @@ func dumpPages(pages ...*Page) {
}
}
+func printStringIndexes(s string) {
+ lines := strings.Split(s, "\n")
+ i := 0
+
+ for _, line := range lines {
+
+ for _, r := range line {
+ fmt.Printf("%-3s", strconv.Itoa(i))
+ i += utf8.RuneLen(r)
+ }
+ i++
+ fmt.Println()
+ for _, r := range line {
+ fmt.Printf("%-3s", string(r))
+ }
+ fmt.Println()
+
+ }
+
+}
func isCI() bool {
return os.Getenv("CI") != ""
}