@@ -386,7 +386,7 @@ function test_case(test) {
|
||||
mangle: test.mangle
|
||||
});
|
||||
var actual = stdout[toplevel ? 1 : 0];
|
||||
if (test.expect_stdout === true) {
|
||||
if (test.expect_stdout === true || test.expect_stdout instanceof Error && test.expect_stdout.name === actual.name) {
|
||||
test.expect_stdout = actual;
|
||||
}
|
||||
if (!sandbox.same_stdout(test.expect_stdout, actual)) {
|
||||
|
||||
@@ -1084,3 +1084,23 @@ issue_4231: {
|
||||
}
|
||||
expect_stdout: "function"
|
||||
}
|
||||
|
||||
issue_4245: {
|
||||
options = {
|
||||
booleans: true,
|
||||
}
|
||||
input: {
|
||||
const a = f();
|
||||
function f() {
|
||||
typeof a;
|
||||
}
|
||||
}
|
||||
expect: {
|
||||
const a = f();
|
||||
function f() {
|
||||
a,
|
||||
1;
|
||||
}
|
||||
}
|
||||
expect_stdout: true
|
||||
}
|
||||
|
||||
@@ -893,3 +893,26 @@ issue_4231: {
|
||||
expect_stdout: "function"
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
issue_4245: {
|
||||
options = {
|
||||
booleans: true,
|
||||
}
|
||||
input: {
|
||||
"use strict";
|
||||
let a = f();
|
||||
function f() {
|
||||
typeof a;
|
||||
}
|
||||
}
|
||||
expect: {
|
||||
"use strict";
|
||||
let a = f();
|
||||
function f() {
|
||||
a,
|
||||
1;
|
||||
}
|
||||
}
|
||||
expect_stdout: ReferenceError("a is not defined")
|
||||
node_version: ">=4"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user