| 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 |
White Space and Line Terminator between LogicalORExpression and "?" or |
| 7 |
between "?" and AssignmentExpression or between AssignmentExpression and |
| 8 |
":" or between ":" and AssignmentExpression are allowed |
| 9 |
es5id: 11.12_A1 |
| 10 |
description: Checking by using eval |
| 11 |
---*/ |
| 12 |
|
| 13 |
//CHECK#1 |
| 14 |
if ((eval("false\u0009?\u0009true\u0009:\u0009true")) !== true) { |
| 15 |
$ERROR('#1: (false\\u0009?\\u0009true\\u0009:\\u0009true) === true'); |
| 16 |
} |
| 17 |
|
| 18 |
//CHECK#2 |
| 19 |
if ((eval("false\u000B?\u000Btrue\u000B:\u000Btrue")) !== true) { |
| 20 |
$ERROR('#2: (false\\u000B?\\u000Btrue\\u000B:\\u000Btrue) === true'); |
| 21 |
} |
| 22 |
|
| 23 |
//CHECK#3 |
| 24 |
if ((eval("false\u000C?\u000Ctrue\u000C:\u000Ctrue")) !== true) { |
| 25 |
$ERROR('#3: (false\\u000C?\\u000Ctrue\\u000C:\\u000Ctrue) === true'); |
| 26 |
} |
| 27 |
|
| 28 |
//CHECK#4 |
| 29 |
if ((eval("false\u0020?\u0020true\u0020:\u0020true")) !== true) { |
| 30 |
$ERROR('#4: (false\\u0020?\\u0020true\\u0020:\\u0020true) === true'); |
| 31 |
} |
| 32 |
|
| 33 |
//CHECK#5 |
| 34 |
if ((eval("false\u00A0?\u00A0true\u00A0:\u00A0true")) !== true) { |
| 35 |
$ERROR('#5: (false\\u00A0?\\u00A0true\\u00A0:\\u00A0true) === true'); |
| 36 |
} |
| 37 |
|
| 38 |
//CHECK#6 |
| 39 |
if ((eval("false\u000A?\u000Atrue\u000A:\u000Atrue")) !== true) { |
| 40 |
$ERROR('#6: (false\\u000A?\\u000Atrue\\u000A:\\u000Atrue) === true'); |
| 41 |
} |
| 42 |
|
| 43 |
//CHECK#7 |
| 44 |
if ((eval("false\u000D?\u000Dtrue\u000D:\u000Dtrue")) !== true) { |
| 45 |
$ERROR('#7: (false\\u000D?\\u000Dtrue\\u000D:\\u000Dtrue) === true'); |
| 46 |
} |
| 47 |
|
| 48 |
//CHECK#8 |
| 49 |
if ((eval("false\u2028?\u2028true\u2028:\u2028true")) !== true) { |
| 50 |
$ERROR('#8: (false\\u2028?\\u2028true\\u2028:\\u2028true) === true'); |
| 51 |
} |
| 52 |
|
| 53 |
//CHECK#9 |
| 54 |
if ((eval("false\u2029?\u2029true\u2029:\u2029true")) !== true) { |
| 55 |
$ERROR('#9: (false\\u2029?\\u2029true\\u2029:\\u2029true) === true'); |
| 56 |
} |
| 57 |
|
| 58 |
//CHECK#10 |
| 59 |
if ((eval("false\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029?\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029true\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029:\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029true")) !== true) { |
| 60 |
$ERROR('#10: (false\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029?\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029:\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true) === true'); |
| 61 |
} |