|
@ -130,6 +130,10 @@ function error_test() { |
|
|
// should throw
|
|
|
// should throw
|
|
|
{ client: client_unix, send: '/(/;', |
|
|
{ client: client_unix, send: '/(/;', |
|
|
expect: /^SyntaxError: Invalid regular expression\:/ }, |
|
|
expect: /^SyntaxError: Invalid regular expression\:/ }, |
|
|
|
|
|
// invalid RegExp modifiers are a special case of syntax error,
|
|
|
|
|
|
// should throw (GH-4012)
|
|
|
|
|
|
{ client: client_unix, send: 'new RegExp("foo", "wrong modifier");', |
|
|
|
|
|
expect: /^SyntaxError: Invalid flags supplied to RegExp constructor/ }, |
|
|
// Named functions can be used:
|
|
|
// Named functions can be used:
|
|
|
{ client: client_unix, send: 'function blah() { return 1; }', |
|
|
{ client: client_unix, send: 'function blah() { return 1; }', |
|
|
expect: prompt_unix }, |
|
|
expect: prompt_unix }, |
|
|