diff --git a/tpl/strings/truncate_test.go b/tpl/strings/truncate_test.go index f7d5d132d..95ca31162 100644 --- a/tpl/strings/truncate_test.go +++ b/tpl/strings/truncate_test.go @@ -81,3 +81,9 @@ func TestTruncate(t *testing.T) { t.Errorf("Should have errored") } } + +func BenchmarkTruncate(b *testing.B) { + for i := 0; i < b.N; i++ { + ns.Truncate(10, "
test hello test something
") + } +}