mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
610 B
43 lines
610 B
/*
|
|
* CallExpression tests
|
|
*/
|
|
|
|
/*===
|
|
basic
|
|
1 2 3
|
|
1 2 3 4
|
|
===*/
|
|
|
|
function f(x) {
|
|
return function (y) {
|
|
return function (z) {
|
|
print(x, y, z);
|
|
}
|
|
}
|
|
}
|
|
|
|
function g(x) {
|
|
return {
|
|
foo: function (y) {
|
|
return function (z) {
|
|
return {
|
|
bar: function (w) {
|
|
print(x, y, z, w);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function basicTest() {
|
|
f(1)(2)(3);
|
|
g(1).foo(2)(3).bar(4);
|
|
}
|
|
|
|
try {
|
|
print('basic');
|
|
basicTest();
|
|
} catch (e) {
|
|
print(e.stack || e);
|
|
}
|
|
|