@@ -72,7 +72,7 @@ function clean_up() {
7272function strict_mode_error_test ( ) {
7373 send_expect ( [
7474 { client : client_unix , send : 'ref = 1' ,
75- expect : / ^ R e f e r e n c e E r r o r : \s r e f \s i s \s n o t \s d e f i n e d \n n o d e v i a U n i x s o c k e t > $ / } ,
75+ expect : / ^ R e f e r e n c e E r r o r : \s / } ,
7676 ] ) ;
7777}
7878
@@ -143,7 +143,7 @@ function error_test() {
143143 expect : prompt_unix } ,
144144 // But passing the same string to eval() should throw
145145 { client : client_unix , send : 'eval("function test_func() {")' ,
146- expect : / ^ S y n t a x E r r o r : U n e x p e c t e d e n d o f i n p u t / } ,
146+ expect : / ^ S y n t a x E r r o r : / } ,
147147 // Can handle multiline template literals
148148 { client : client_unix , send : '`io.js' ,
149149 expect : prompt_multiline } ,
@@ -172,51 +172,48 @@ function error_test() {
172172 // invalid input to JSON.parse error is special case of syntax error,
173173 // should throw
174174 { client : client_unix , send : 'JSON.parse(\'{invalid: \\\'json\\\'}\');' ,
175- expect : / ^ S y n t a x E r r o r : U n e x p e c t e d t o k e n i / } ,
175+ expect : / ^ S y n t a x E r r o r : / } ,
176176 // end of input to JSON.parse error is special case of syntax error,
177177 // should throw
178178 { client : client_unix , send : 'JSON.parse(\'066\');' ,
179- expect : / ^ S y n t a x E r r o r : U n e x p e c t e d n u m b e r / } ,
179+ expect : / ^ S y n t a x E r r o r : / } ,
180180 // should throw
181181 { client : client_unix , send : 'JSON.parse(\'{\');' ,
182- expect : / ^ S y n t a x E r r o r : U n e x p e c t e d e n d o f J S O N i n p u t / } ,
182+ expect : / ^ S y n t a x E r r o r : / } ,
183183 // invalid RegExps are a special case of syntax error,
184184 // should throw
185185 { client : client_unix , send : '/(/;' ,
186- expect : / ^ S y n t a x E r r o r : I n v a l i d r e g u l a r e x p r e s s i o n : / } ,
186+ expect : / ^ S y n t a x E r r o r : / } ,
187187 // invalid RegExp modifiers are a special case of syntax error,
188188 // should throw (GH-4012)
189189 { client : client_unix , send : 'new RegExp("foo", "wrong modifier");' ,
190- expect : / ^ S y n t a x E r r o r : I n v a l i d f l a g s s u p p l i e d t o R e g E x p c o n s t r u c t o r / } ,
190+ expect : / ^ S y n t a x E r r o r : / } ,
191191 // strict mode syntax errors should be caught (GH-5178)
192192 { client : client_unix ,
193193 send : '(function() { "use strict"; return 0755; })()' ,
194- expect : / \b S y n t a x E r r o r : O c t a l l i t e r a l s a r e n o t a l l o w e d i n s t r i c t m o d e / } ,
194+ expect : / \b S y n t a x E r r o r : / } ,
195195 {
196196 client : client_unix ,
197197 send : '(function(a, a, b) { "use strict"; return a + b + c; })()' ,
198- expect :
199- / \b S y n t a x E r r o r : D u p l i c a t e p a r a m e t e r n a m e n o t a l l o w e d i n t h i s c o n t e x t /
198+ expect : / \b S y n t a x E r r o r : /
200199 } ,
201200 {
202201 client : client_unix ,
203202 send : '(function() { "use strict"; with (this) {} })()' ,
204- expect : / \b S y n t a x E r r o r : S t r i c t m o d e c o d e m a y n o t i n c l u d e a w i t h s t a t e m e n t /
203+ expect : / \b S y n t a x E r r o r : /
205204 } ,
206205 {
207206 client : client_unix ,
208207 send : '(function() { "use strict"; var x; delete x; })()' ,
209- expect :
210- / \b S y n t a x E r r o r : D e l e t e o f a n u n q u a l i f i e d i d e n t i f i e r i n s t r i c t m o d e /
208+ expect : / \b S y n t a x E r r o r : /
211209 } ,
212210 { client : client_unix ,
213211 send : '(function() { "use strict"; eval = 17; })()' ,
214- expect : / \b S y n t a x E r r o r : U n e x p e c t e d e v a l o r a r g u m e n t s i n s t r i c t m o d e / } ,
212+ expect : / \b S y n t a x E r r o r : / } ,
215213 {
216214 client : client_unix ,
217215 send : '(function() { "use strict"; if (true) function f() { } })()' ,
218- expect :
219- / \b S y n t a x E r r o r : I n s t r i c t m o d e c o d e , f u n c t i o n s c a n o n l y b e d e c l a r e d a t t o p l e v e l o r i n s i d e a b l o c k \. /
216+ expect : / \b S y n t a x E r r o r : /
220217 } ,
221218 // Named functions can be used:
222219 { client : client_unix , send : 'function blah() { return 1; }' ,
@@ -268,7 +265,7 @@ function error_test() {
268265 expect : `Invalid REPL keyword\n${ prompt_unix } ` } ,
269266 // fail when we are not inside a String and a line continuation is used
270267 { client : client_unix , send : '[] \\' ,
271- expect : / \b S y n t a x E r r o r : I n v a l i d o r u n e x p e c t e d t o k e n / } ,
268+ expect : / \b S y n t a x E r r o r : / } ,
272269 // do not fail when a String is created with line continuation
273270 { client : client_unix , send : '\'the\\\nfourth\\\neye\'' ,
274271 expect : `${ prompt_multiline } ${ prompt_multiline } 'thefourtheye'\n${
0 commit comments