That particular version of Node.js has messed up error messages, so provide a version-specific workaround. Also fixed an formatting issue which would cause `expect_stdout` to fail if error message contains excerpts of input. Apply `expect_stdout` to more applicable tests.
58 lines
1.0 KiB
JavaScript
58 lines
1.0 KiB
JavaScript
issue_1321_no_debug: {
|
|
mangle_props = {
|
|
ignore_quoted: true
|
|
}
|
|
input: {
|
|
var x = {};
|
|
x.foo = 1;
|
|
x["a"] = 2 * x.foo;
|
|
console.log(x.foo, x["a"]);
|
|
}
|
|
expect: {
|
|
var x = {};
|
|
x.b = 1;
|
|
x["a"] = 2 * x.b;
|
|
console.log(x.b, x["a"]);
|
|
}
|
|
expect_stdout: true
|
|
}
|
|
|
|
issue_1321_debug: {
|
|
mangle_props = {
|
|
ignore_quoted: true,
|
|
debug: ""
|
|
}
|
|
input: {
|
|
var x = {};
|
|
x.foo = 1;
|
|
x["_$foo$_"] = 2 * x.foo;
|
|
console.log(x.foo, x["_$foo$_"]);
|
|
}
|
|
expect: {
|
|
var x = {};
|
|
x.a = 1;
|
|
x["_$foo$_"] = 2 * x.a;
|
|
console.log(x.a, x["_$foo$_"]);
|
|
}
|
|
expect_stdout: true
|
|
}
|
|
|
|
issue_1321_with_quoted: {
|
|
mangle_props = {
|
|
ignore_quoted: false
|
|
}
|
|
input: {
|
|
var x = {};
|
|
x.foo = 1;
|
|
x["a"] = 2 * x.foo;
|
|
console.log(x.foo, x["a"]);
|
|
}
|
|
expect: {
|
|
var x = {};
|
|
x.a = 1;
|
|
x["b"] = 2 * x.a;
|
|
console.log(x.a, x["b"]);
|
|
}
|
|
expect_stdout: true
|
|
}
|