Skip to content

Commit 0270adb

Browse files
aditya87aadi-stripe
authored andcommitted
Ensure support for inner arrays
1 parent ad77b88 commit 0270adb

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

packages/interpreter/test/integration/positiveTestsProvider.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ export const WithMultilineOutputPositiveTests = [
10121012
bol bhai a[3];
10131013
bye bhai
10141014
`,
1015-
outputs: [`1,4,3`, `1`, `4`, `3`]
1015+
outputs: [`[1, 4, 3]`, `1`, `4`, `3`]
10161016
},
10171017
{
10181018
name: "array access and length loop test",
@@ -1032,7 +1032,20 @@ export const WithMultilineOutputPositiveTests = [
10321032
bol bhai a;
10331033
bye bhai
10341034
`,
1035-
outputs: [`-1,0,3,-5`,`0`,`1,2,5,-3`]
1035+
outputs: [`[-1, 0, 3, -5]`,`0`,`[1, 2, 5, -3]`]
1036+
},
1037+
{
1038+
name: "inner arrays test",
1039+
input: `
1040+
hi bhai
1041+
bhai ye hai a = [-1, 0, 3, [1, 2]];
1042+
bhai ye hai k = a[3];
1043+
k[0] = -5;
1044+
1045+
bol bhai a;
1046+
bye bhai
1047+
`,
1048+
outputs: [`[-1, 0, 3, [-5, 2]]`]
10361049
}
10371050
];
10381051

0 commit comments

Comments
 (0)