mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
helpers: Add BenchmarkTrimShortHTML
This commit is contained in:
parent
00ae8e8c72
commit
bfc3122f8e
1 changed files with 8 additions and 0 deletions
|
@ -50,6 +50,14 @@ func TestTrimShortHTML(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func BenchmarkTrimShortHTML(b *testing.B) {
|
||||
c := newTestContentSpec(nil)
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
c.TrimShortHTML([]byte("<p>Simple paragraph</p>"))
|
||||
}
|
||||
}
|
||||
|
||||
func TestBytesToHTML(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
c.Assert(helpers.BytesToHTML([]byte("dobedobedo")), qt.Equals, template.HTML("dobedobedo"))
|
||||
|
|
Loading…
Reference in a new issue