diff options
author | Evan Lucas <evanlucas@me.com> | 2015-10-29 11:22:00 -0500 |
---|---|---|
committer | Evan Lucas <evanlucas@me.com> | 2015-10-29 13:08:32 -0500 |
commit | 08166cb99a880cdb6a61d3c1ff4765144cd81451 (patch) | |
tree | f0d345528f492559925ef0a83cd00f129acbd452 /test/fixtures/syntax | |
parent | 810cc05116b39963b25c87fd17be32a6bb867eb0 (diff) | |
download | node-new-08166cb99a880cdb6a61d3c1ff4765144cd81451.tar.gz |
src: wrap source before doing syntax check
This is to ensure that it is evaluated the same way it would be if it
were to be run by node or required.
Before, the following would pass if run by node, but fail if run via
the syntax check flag:
if (true) {
return;
}
Now, this will pass the syntax check
PR-URL: https://github.com/nodejs/node/pull/3587
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'test/fixtures/syntax')
-rw-r--r-- | test/fixtures/syntax/illegal_if_not_wrapped.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/fixtures/syntax/illegal_if_not_wrapped.js b/test/fixtures/syntax/illegal_if_not_wrapped.js new file mode 100644 index 0000000000..d76a836c88 --- /dev/null +++ b/test/fixtures/syntax/illegal_if_not_wrapped.js @@ -0,0 +1,3 @@ +if (true) { + return; +} |