update slice test

This commit is contained in:
James Bardin 2019-05-01 16:48:01 -04:00
parent 359f057a16
commit d186d3a490
1 changed files with 8 additions and 1 deletions

View File

@ -592,11 +592,18 @@ func TestFunctions(t *testing.T) {
"slice": { "slice": {
{ {
`slice(["a", "b", "c", "d"], 1, 3)`, // force a list type here for testing
`slice(list("a", "b", "c", "d"), 1, 3)`,
cty.ListVal([]cty.Value{ cty.ListVal([]cty.Value{
cty.StringVal("b"), cty.StringVal("c"), cty.StringVal("b"), cty.StringVal("c"),
}), }),
}, },
{
`slice(["a", "b", 3, 4], 1, 3)`,
cty.TupleVal([]cty.Value{
cty.StringVal("b"), cty.NumberIntVal(3),
}),
},
}, },
"sort": { "sort": {