@@ -142,7 +142,7 @@ function error_test() {
142142 expect : prompt_unix } ,
143143 // But passing the same string to eval() should throw
144144 { client : client_unix , send : 'eval("function test_func() {")' ,
145- expect : / \b 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 / } ,
145+ 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 / } ,
146146 // Can handle multiline template literals
147147 { client : client_unix , send : '`io.js' ,
148148 expect : prompt_multiline } ,
@@ -171,30 +171,31 @@ function error_test() {
171171 // invalid input to JSON.parse error is special case of syntax error,
172172 // should throw
173173 { client : client_unix , send : 'JSON.parse(\'{invalid: \\\'json\\\'}\');' ,
174- expect : / \b 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 / } ,
174+ 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 / } ,
175175 // end of input to JSON.parse error is special case of syntax error,
176176 // should throw
177177 { client : client_unix , send : 'JSON.parse(\'066\');' ,
178- expect : / \b 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 / } ,
178+ 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 / } ,
179179 // should throw
180180 { client : client_unix , send : 'JSON.parse(\'{\');' ,
181- expect : / \b 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 / } ,
181+ 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 / } ,
182182 // invalid RegExps are a special case of syntax error,
183183 // should throw
184184 { client : client_unix , send : '/(/;' ,
185- expect : / \b 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 : / } ,
185+ 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 : / } ,
186186 // invalid RegExp modifiers are a special case of syntax error,
187187 // should throw (GH-4012)
188188 { client : client_unix , send : 'new RegExp("foo", "wrong modifier");' ,
189- expect : / \b 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 / } ,
189+ 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 / } ,
190190 // strict mode syntax errors should be caught (GH-5178)
191191 { client : client_unix ,
192192 send : '(function() { "use strict"; return 0755; })()' ,
193193 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 / } ,
194194 {
195195 client : client_unix ,
196196 send : '(function(a, a, b) { "use strict"; return a + b + c; })()' ,
197- expect : / \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 /
197+ expect :
198+ / \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 /
198199 } ,
199200 {
200201 client : client_unix ,
@@ -204,15 +205,17 @@ function error_test() {
204205 {
205206 client : client_unix ,
206207 send : '(function() { "use strict"; var x; delete x; })()' ,
207- expect : / \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 :
209+ / \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 /
208210 } ,
209211 { client : client_unix ,
210212 send : '(function() { "use strict"; eval = 17; })()' ,
211213 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 / } ,
212214 {
213215 client : client_unix ,
214216 send : '(function() { "use strict"; if (true) function f() { } })()' ,
215- expect : / \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 \. /
217+ expect :
218+ / \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 \. /
216219 } ,
217220 // Named functions can be used:
218221 { client : client_unix , send : 'function blah() { return 1; }' ,
0 commit comments