mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Make string sorting (e.g. ByTitle, ByLinkTitle and ByParam) language aware
Fixes #2180
This commit is contained in:
@@ -19,6 +19,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/gohugoio/hugo/common/maps"
|
||||
"github.com/gohugoio/hugo/config"
|
||||
"github.com/gohugoio/hugo/langs"
|
||||
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
)
|
||||
@@ -28,7 +30,9 @@ type stringsSlice []string
|
||||
func TestSort(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ns := New(&deps.Deps{})
|
||||
ns := New(&deps.Deps{
|
||||
Language: langs.NewDefaultLanguage(config.New()),
|
||||
})
|
||||
|
||||
type ts struct {
|
||||
MyInt int
|
||||
|
Reference in New Issue
Block a user