],
[ "if(1)/a /g.exec('Pa ss');", "if(1)/a /g.exec('Pa ss');" ],
- // newline insertion after 1000 chars: break after the "++", not before
- [ str_repeat( ';', 996 ) . "if(x++);", str_repeat( ';', 996 ) . "if(x++\n);" ],
-
// Unicode letter characters should pass through ok in identifiers (T33187)
[ "var KaŝSkatolVal = {}", 'var KaŝSkatolVal={}' ],
';',
],
],
+ [
+ // Must not break before '++'
+ 'if(x++);',
+ [
+ 'if',
+ '(',
+ 'x++',
+ ')',
+ ';',
+ ],
+ ],
[
// Regression test for T201606.
// Must not break between 'return' and Expression.
+ // Was caused by bad state after '{}' in property value.
<<<JAVASCRIPT
call( function () {
try {
} catch (e) {
- push = {
- apply: 1 ? 0 : {}
+ obj = {
+ key: 1 ? 0 : {}
};
}
return name === 'input';
'e',
')',
'{',
- 'push',
+ 'obj',
'=',
'{',
- 'apply',
+ 'key',
':',
'1',
'?',
'}',
';',
'}',
- 'return', 'name', // FIXME
+ // The return Statement:
+ // return [no LineTerminator here] Expression
+ 'return name',
'===',
"'input'",
';',
')',
';',
]
- ]
+ ],
+ [
+ // Regression test for T201606.
+ // Must not break between 'return' and Expression.
+ // FIXME: Cause?
+ <<<JAVASCRIPT
+call( {
+ key: 1 ? 0 : function () {
+ return this;
+ }
+} );
+JAVASCRIPT
+ ,
+ [
+ 'call',
+ '(',
+ '{',
+ 'key',
+ ':',
+ '1',
+ '?',
+ '0',
+ ':',
+ 'function',
+ '(',
+ ')',
+ '{',
+ 'return', 'this', // FIXME
+ ';',
+ '}',
+ '}',
+ ')',
+ ';',
+ ]
+ ],
];
}