Skip to content

Commit

Permalink
Ensure support for inner arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya87 authored and aadi-stripe committed Jan 29, 2023
1 parent ad77b88 commit 0270adb
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions packages/interpreter/test/integration/positiveTestsProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ export const WithMultilineOutputPositiveTests = [
bol bhai a[3];
bye bhai
`,
outputs: [`1,4,3`, `1`, `4`, `3`]
outputs: [`[1, 4, 3]`, `1`, `4`, `3`]
},
{
name: "array access and length loop test",
Expand All @@ -1032,7 +1032,20 @@ export const WithMultilineOutputPositiveTests = [
bol bhai a;
bye bhai
`,
outputs: [`-1,0,3,-5`,`0`,`1,2,5,-3`]
outputs: [`[-1, 0, 3, -5]`,`0`,`[1, 2, 5, -3]`]
},
{
name: "inner arrays test",
input: `
hi bhai
bhai ye hai a = [-1, 0, 3, [1, 2]];
bhai ye hai k = a[3];
k[0] = -5;
bol bhai a;
bye bhai
`,
outputs: [`[-1, 0, 3, [-5, 2]]`]
}
];

0 comments on commit 0270adb

Please sign in to comment.