|
|
|
|
@ -69,6 +69,43 @@ func TestExpand(t *testing.T) {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Map: map[string]string{
|
|
|
|
|
"list_of_map.#": "2",
|
|
|
|
|
"list_of_map.0.%": "1",
|
|
|
|
|
"list_of_map.0.a": "1",
|
|
|
|
|
"list_of_map.1.%": "2",
|
|
|
|
|
"list_of_map.1.b": "2",
|
|
|
|
|
"list_of_map.1.c": "3",
|
|
|
|
|
},
|
|
|
|
|
Key: "list_of_map",
|
|
|
|
|
Output: []interface{}{
|
|
|
|
|
map[string]interface{}{
|
|
|
|
|
"a": "1",
|
|
|
|
|
},
|
|
|
|
|
map[string]interface{}{
|
|
|
|
|
"b": "2",
|
|
|
|
|
"c": "3",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Map: map[string]string{
|
|
|
|
|
"map_of_list.%": "2",
|
|
|
|
|
"map_of_list.list2.#": "1",
|
|
|
|
|
"map_of_list.list2.0": "c",
|
|
|
|
|
"map_of_list.list1.#": "2",
|
|
|
|
|
"map_of_list.list1.0": "a",
|
|
|
|
|
"map_of_list.list1.1": "b",
|
|
|
|
|
},
|
|
|
|
|
Key: "map_of_list",
|
|
|
|
|
Output: map[string]interface{}{
|
|
|
|
|
"list1": []interface{}{"a", "b"},
|
|
|
|
|
"list2": []interface{}{"c"},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for _, tc := range cases {
|
|
|
|
|
|