Skip to content

Commit d7fa65a

Browse files
committed
Unit test proving signature calculation issue
1 parent 62b3d54 commit d7fa65a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/test/java/com/dashjoin/jsonata/SignatureTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,17 @@ public Object call(Object input, List args) throws Throwable {
5555
}, "<n+:n>"));
5656
Assertions.assertEquals(6, expression.evaluate(null));
5757
}
58+
59+
@Test
60+
public void testVarArgMany(){
61+
Jsonata expr = jsonata("$customArgs('test',[1,2,3,4],3)");
62+
expr.registerFunction("customArgs", new JFunction(new JFunctionCallable() {
63+
64+
@Override
65+
public Object call(Object input, @SuppressWarnings("rawtypes") List args) throws Throwable {
66+
return args.toString();
67+
}
68+
}, "<sa<n>n:s>"));
69+
Assertions.assertEquals("[test, [1, 2, 3, 4], 3]", expr.evaluate(null));
70+
}
5871
}

0 commit comments

Comments
 (0)