add test
This commit is contained in:
parent
ec7cabed3b
commit
19dfbfb4b3
|
|
@ -4136,6 +4136,34 @@ return_1: {
|
|||
}
|
||||
|
||||
return_2: {
|
||||
options = {
|
||||
collapse_vars: true,
|
||||
unused: true,
|
||||
}
|
||||
input: {
|
||||
var log = console.log;
|
||||
function f(b, c) {
|
||||
var a = c();
|
||||
if (b) return b;
|
||||
log(a);
|
||||
}
|
||||
f(false, function() { return 1 });
|
||||
f(true, function() { return 2 });
|
||||
}
|
||||
expect: {
|
||||
var log = console.log;
|
||||
function f(b, c) {
|
||||
var a = c();
|
||||
if (b) return b;
|
||||
log(a);
|
||||
}
|
||||
f(false, function() { return 1 });
|
||||
f(true, function() { return 2 });
|
||||
}
|
||||
expect_stdout: "1"
|
||||
}
|
||||
|
||||
return_3: {
|
||||
options = {
|
||||
collapse_vars: true,
|
||||
unused: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user