From 6e9d1c868474273b3b5891508c28aa13f70ff465 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 7 Jan 2015 19:16:21 +0100 Subject: [PATCH] test: fix parallel/test-repl with new v8 Per the ES6 spec, V8 3.31 no longer throws a SyntaxError for scoped function declarations. PR-URL: https://github.com/iojs/io.js/pull/243 Reviewed-By: Domenic Denicola Reviewed-By: Fedor Indutny Reviewed-By: Trevor Norris --- test/parallel/test-repl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 69b9b54d1e9e40..a906082f76fd25 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -166,7 +166,7 @@ function error_test() { expect: /^SyntaxError: Delete of an unqualified identifier in strict mode/ }, { client: client_unix, send: '(function() { "use strict"; eval = 17; })()', expect: /^SyntaxError: Unexpected eval or arguments in strict mode/ }, - { client: client_unix, send: '(function() { "use strict"; if (true){ function f() { } } })()', + { client: client_unix, send: '(function() { "use strict"; if (true) function f() { } })()', expect: /^SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function/ }, // Named functions can be used: { client: client_unix, send: 'function blah() { return 1; }',