mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
@@ -157,7 +157,7 @@ func TestPageSortReverse(t *testing.T) {
|
||||
func TestPageSortByParam(t *testing.T) {
|
||||
t.Parallel()
|
||||
c := qt.New(t)
|
||||
var k interface{} = "arbitrarily.nested"
|
||||
var k any = "arbitrarily.nested"
|
||||
|
||||
unsorted := createSortTestPages(10)
|
||||
delete(unsorted[9].Params(), "arbitrarily")
|
||||
@@ -188,7 +188,7 @@ func TestPageSortByParamNumeric(t *testing.T) {
|
||||
t.Parallel()
|
||||
c := qt.New(t)
|
||||
|
||||
var k interface{} = "arbitrarily.nested"
|
||||
var k any = "arbitrarily.nested"
|
||||
|
||||
n := 10
|
||||
unsorted := createSortTestPages(n)
|
||||
@@ -198,8 +198,8 @@ func TestPageSortByParamNumeric(t *testing.T) {
|
||||
v = 100.0 - i
|
||||
}
|
||||
|
||||
unsorted[i].(*testPage).params = map[string]interface{}{
|
||||
"arbitrarily": map[string]interface{}{
|
||||
unsorted[i].(*testPage).params = map[string]any{
|
||||
"arbitrarily": map[string]any{
|
||||
"nested": v,
|
||||
},
|
||||
}
|
||||
@@ -268,8 +268,8 @@ func createSortTestPages(num int) Pages {
|
||||
p := newTestPage()
|
||||
p.path = fmt.Sprintf("/x/y/p%d.md", i)
|
||||
p.title = fmt.Sprintf("Title %d", i%(num+1/2))
|
||||
p.params = map[string]interface{}{
|
||||
"arbitrarily": map[string]interface{}{
|
||||
p.params = map[string]any{
|
||||
"arbitrarily": map[string]any{
|
||||
"nested": ("xyz" + fmt.Sprintf("%v", 100-i)),
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user