mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
@@ -212,6 +212,19 @@ func TestToKeywordsToLower(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestToKeywordsAnySlice(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
var config IndexConfig
|
||||
slice := []any{"A", 32, "C"}
|
||||
keywords, err := config.ToKeywords(slice)
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(keywords, qt.DeepEquals, []Keyword{
|
||||
StringKeyword("A"),
|
||||
StringKeyword("32"),
|
||||
StringKeyword("C"),
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkRelatedNewIndex(b *testing.B) {
|
||||
pages := make([]*testDoc, 100)
|
||||
numkeywords := 30
|
||||
|
Reference in New Issue
Block a user