| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: | |
| 6 |
If F contains any character other than 'g', 'i', or 'm', or if it |
| 7 |
contains the same one more than once, then throw a SyntaxError exception |
| 8 |
es5id: 15.10.4.1_A5_T8 |
| 9 |
description: > |
| 10 |
Checking if using "true" as F leads to throwing the correct |
| 11 |
exception |
| 12 |
---*/ |
| 13 |
|
| 14 |
//CHECK#1 |
| 15 |
try { |
| 16 |
$ERROR('#1.1: new RegExp("|",true) throw SyntaxError. Actual: ' + (new RegExp("|",true))); |
| 17 |
} catch (e) { |
| 18 |
if ((e instanceof SyntaxError) !== true) { |
| 19 |
$ERROR('#1.2: new RegExp("|",true) throw SyntaxError. Actual: ' + (e)); |
| 20 |
} |
| 21 |
} |