diff --git a/t_list_test.go b/t_list_test.go index 06710a0..e9808ed 100644 --- a/t_list_test.go +++ b/t_list_test.go @@ -49,8 +49,10 @@ func TestListParser(t *testing.T) { /* 35 */ {`L=[1,2]; L[5]=9; L`, nil, errors.New(`index 5 out of bounds (0, 1)`)}, /* 36 */ {`L=[1,2]; L[]=9; L`, nil, errors.New(`[1:12] index/key specification expected, got [] [list]`)}, /* 37 */ {`L=[1,2]; L[nil]=9;`, nil, errors.New(`[1:12] index/key is nil`)}, - // /* 8 */ {`[int(x)|x=csv("test.csv",1,all(),1)]`, []any{int64(10), int64(40), int64(20)}, nil}, - // /* 9 */ {`sum(@[int(x)|x=csv("test.csv",1,all(),1)])`, []any{int64(10), int64(40), int64(20)}, nil}, + /* 38 */ {`[0,1,2,3,4][2:3]`, newListA(int64(2)), nil}, + /* 39 */ {`[0,1,2,3,4][3:-1]`, newListA(int64(3)), nil}, + /* 40 */ {`[0,1,2,3,4][-3:-1]`, newListA(int64(2), int64(3)), nil}, + /* 41 */ {`[0,1,2,3,4][0:]`, newListA(int64(0), int64(1), int64(2), int64(3), int64(4)), nil}, } // t.Setenv("EXPR_PATH", ".")