mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Add support for sort by boolean
This commit is contained in:
@@ -218,6 +218,9 @@ func TestSort(t *testing.T) {
|
||||
map[interface{}]interface{}{"Title": "Foo", "Weight": 10},
|
||||
},
|
||||
},
|
||||
// test boolean values
|
||||
{[]bool{false, true, false}, "value", "asc", []bool{false, false, true}},
|
||||
{[]bool{false, true, false}, "value", "desc", []bool{true, false, false}},
|
||||
// test error cases
|
||||
{(*[]TstX)(nil), nil, "asc", false},
|
||||
{TstX{A: "a", B: "b"}, nil, "asc", false},
|
||||
|
Reference in New Issue
Block a user