test: Add test case for extracting value with map

This commit is contained in:
overflowerror 2024-05-05 21:55:33 +02:00
parent 2d0d7691d7
commit 963e57c995
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,11 @@
var a = []{'a', 'b', 'c'};
var extract = 0;
map(i, v in a) {
if (i == 1) {
extract = v;
}
}
print(extract, '\n');

View file

@ -0,0 +1,10 @@
>>>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]<[-<<<+>>>>+<]>[-<+>]<[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]<[-<<+>>>+<]>[-<+>]<[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]<[-<+>>+<]>[-<+>]
<[-]
>[-]>[-]+>[-]>[-]<<<[->>+>+<<<]>>>[-<<<+>>>]<<[->-<]+>[<->[-]]<[<<[-]>>>[-]<<<<<<[->>>+>>>+<<<<<<]>>>>>>[-<<<<<<+>>>>>>]
<[-]]
<+>[-]+>[-]>[-]<<<[->>+>+<<<]>>>[-<<<+>>>]<<[->-<]+>[<->[-]]<[<<[-]>>>[-]<<<<<[->>+>>>+<<<<<]>>>>>[-<<<<<+>>>>>]
<[-]]
<+>[-]+>[-]>[-]<<<[->>+>+<<<]>>>[-<<<+>>>]<<[->-<]+>[<->[-]]<[<<[-]>>>[-]<<<<[->+>>>+<<<<]>>>>[-<<<<+>>>>]
<[-]]
<+
[-]++++++++++<.>.