File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/test/java/com/dashjoin/jsonata Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 44import static java .util .Arrays .asList ;
55import static java .util .Map .of ;
66import static org .junit .jupiter .api .Assertions .assertEquals ;
7+ import java .util .Arrays ;
78import java .util .Map ;
89import org .junit .jupiter .api .Assertions ;
10+ import org .junit .jupiter .api .Disabled ;
911import org .junit .jupiter .api .Test ;
1012
1113public class ArrayTest {
@@ -25,4 +27,12 @@ public void filterTest() {
2527 Jsonata expr = jsonata ("($arr := [{'x':1}, {'x':2}];$arr[x=$number($$.variable.field)])" );
2628 Assertions .assertNotNull (expr .evaluate (Map .of ("variable" , Map .of ("field" , "1" ))));
2729 }
30+
31+ @ Disabled
32+ @ Test
33+ public void testIndex () {
34+ Jsonata expr = jsonata ("($x:=['a','b']; $x#$i.$i)" );
35+ Assertions .assertEquals (Arrays .asList (0 , 1 ), expr .evaluate (1 ));
36+ Assertions .assertEquals (Arrays .asList (0 , 1 ), expr .evaluate (null ));
37+ }
2838}
You can’t perform that action at this time.
0 commit comments