make expect_stdout work on Node.js 0.12 (#1623)

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.
This commit is contained in:
Alex Lam S.L
2017-03-19 12:00:32 +08:00
committed by GitHub
parent 96f8befdd7
commit a3cc3a9b87
20 changed files with 89 additions and 6 deletions

View File

@@ -128,6 +128,7 @@ do_screw_try_catch_undefined: {
return void 0===o
}
}
expect_stdout: true
}
dont_screw_try_catch_undefined: {
@@ -156,6 +157,7 @@ dont_screw_try_catch_undefined: {
return n === undefined
}
}
expect_stdout: true
}
reduce_vars: {
@@ -208,6 +210,7 @@ issue_1586_1: {
}
}
expect_exact: "function f(){try{}catch(c){console.log(c.message)}}"
expect_stdout: true
}
issue_1586_2: {
@@ -226,4 +229,5 @@ issue_1586_2: {
}
}
expect_exact: "function f(){try{}catch(c){console.log(c.message)}}"
expect_stdout: true
}