mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
9abd396789
commit
9f46a72c7e
1 changed files with 3 additions and 0 deletions
|
@ -37,6 +37,9 @@ func TestIndex(t *testing.T) {
|
|||
{[][]int{{1, 2}, {3, 4}}, []interface{}{0, 0}, 1, false},
|
||||
{map[int]int{1: 10, 2: 20}, []interface{}{1}, 10, false},
|
||||
{map[int]int{1: 10, 2: 20}, []interface{}{0}, 0, false},
|
||||
{map[string]map[string]string{"a": {"b": "c"}}, []interface{}{"a", "b"}, "c", false},
|
||||
{[]map[string]map[string]string{{"a": {"b": "c"}}}, []interface{}{0, "a", "b"}, "c", false},
|
||||
{map[string]map[string]interface{}{"a": {"b": []string{"c", "d"}}}, []interface{}{"a", "b", 1}, "d", false},
|
||||
// errors
|
||||
{nil, nil, nil, true},
|
||||
{[]int{0, 1}, []interface{}{"1"}, nil, true},
|
||||
|
|
Loading…
Reference in a new issue