white-space.js (1470B)
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 description: > 5 White Space between LeftHandSideExpression and "=" or between "=" and 6 AssignmentExpression is allowed 7 es5id: 11.13.1_A1 8 ---*/ 9 10 var x; 11 12 x = 'U+0009'; 13 if (x !== 'U+0009') { 14 throw new Test262Error('#1: (x\\u0009=\\u0009true) === true'); 15 } 16 17 x='U+000B'; 18 if (x !== 'U+000B') { 19 throw new Test262Error('#2: (x\\u000B=\\u000Btrue) === true'); 20 } 21 22 x='U+000C'; 23 if (x !== 'U+000C') { 24 throw new Test262Error('#3: (x\\u000C=\\u000Ctrue) === true'); 25 } 26 27 x = 'U+0020'; 28 if (x !== 'U+0020') { 29 throw new Test262Error('#4: (x\\u0020=\\u0020true) === true'); 30 } 31 32 x = 'U+00A0'; 33 if (x !== 'U+00A0') { 34 throw new Test262Error('#5: (x\\u00A0=\\u00A0true) === true'); 35 } 36 37 x 38 = 39 'U+000D'; 40 if (x !== 'U+000D') { 41 throw new Test262Error('#7: (x\\u000D=\\u000Dtrue) === true'); 42 } 43 44 x = 'U+2028'; 45 if (x !== 'U+2028') { 46 throw new Test262Error('#8: (x\\u2028=\\u2028true) === true'); 47 } 48 49 x = 'U+2029'; 50 if (x !== 'U+2029') { 51 throw new Test262Error('#9: (x\\u2029=\\u2029true) === true'); 52 } 53 54 x 55 = 56 'U+0009U+000BU+000CU+0020U+00A0U+000DU+2028U+2029'; 57 if (x !== 'U+0009U+000BU+000CU+0020U+00A0U+000DU+2028U+2029') { 58 throw new Test262Error('#10: (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000D\\u2028\\u2029=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000D\\u2028\\u2029true) === true'); 59 } 60 61 reportCompare(0, 0);