| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
var gTestfile = 'regress-188206-02.js'; |
| 8 |
var UBound = 0; |
| 9 |
var BUGNUMBER = 188206; |
| 10 |
var summary = 'Invalid use of regexp quantifiers should generate SyntaxErrors'; |
| 11 |
var CHECK_PASSED = 'Should not generate an error'; |
| 12 |
var CHECK_FAILED = 'Generated an error!'; |
| 13 |
var status = ''; |
| 14 |
var statusitems = []; |
| 15 |
var actual = ''; |
| 16 |
var actualvalues = []; |
| 17 |
var expect= ''; |
| 18 |
var expectedvalues = []; |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
status = inSection(13); |
| 38 |
checkThis(' /a*{/ '); |
| 39 |
|
| 40 |
status = inSection(14); |
| 41 |
checkThis(' /a{}/ '); |
| 42 |
|
| 43 |
status = inSection(15); |
| 44 |
checkThis(' /{a/ '); |
| 45 |
|
| 46 |
status = inSection(16); |
| 47 |
checkThis(' /}a/ '); |
| 48 |
|
| 49 |
status = inSection(17); |
| 50 |
checkThis(' /x{abc}/ '); |
| 51 |
|
| 52 |
status = inSection(18); |
| 53 |
checkThis(' /{{0}/ '); |
| 54 |
|
| 55 |
status = inSection(19); |
| 56 |
checkThis(' /{{1}/ '); |
| 57 |
|
| 58 |
status = inSection(20); |
| 59 |
checkThis(' /x{{0}/ '); |
| 60 |
|
| 61 |
status = inSection(21); |
| 62 |
checkThis(' /x{{1}/ '); |
| 63 |
|
| 64 |
status = inSection(22); |
| 65 |
checkThis(' /x{{0}}/ '); |
| 66 |
|
| 67 |
status = inSection(23); |
| 68 |
checkThis(' /x{{1}}/ '); |
| 69 |
|
| 70 |
status = inSection(24); |
| 71 |
checkThis(' /x{{0}}/ '); |
| 72 |
|
| 73 |
status = inSection(25); |
| 74 |
checkThis(' /x{{1}}/ '); |
| 75 |
|
| 76 |
status = inSection(26); |
| 77 |
checkThis(' /x{{0}}/ '); |
| 78 |
|
| 79 |
status = inSection(27); |
| 80 |
checkThis(' /x{{1}}/ '); |
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
test(); |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
function checkThis(sAllowedSyntax) |
| 93 |
{ |
| 94 |
expect = CHECK_PASSED; |
| 95 |
actual = CHECK_PASSED; |
| 96 |
|
| 97 |
try |
| 98 |
{ |
| 99 |
eval(sAllowedSyntax); |
| 100 |
} |
| 101 |
catch(e) |
| 102 |
{ |
| 103 |
actual = CHECK_FAILED; |
| 104 |
} |
| 105 |
|
| 106 |
statusitems[UBound] = status; |
| 107 |
expectedvalues[UBound] = expect; |
| 108 |
actualvalues[UBound] = actual; |
| 109 |
UBound++; |
| 110 |
} |
| 111 |
|
| 112 |
|
| 113 |
function test() |
| 114 |
{ |
| 115 |
enterFunc('test'); |
| 116 |
printBugNumber(BUGNUMBER); |
| 117 |
printStatus(summary); |
| 118 |
|
| 119 |
for (var i=0; i<UBound; i++) |
| 120 |
{ |
| 121 |
reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]); |
| 122 |
} |
| 123 |
|
| 124 |
exitFunc ('test'); |
| 125 |
} |