File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -119,11 +119,24 @@ describe('Test precedence', function() {
119
119
it ( 'test + / *' , function ( ) {
120
120
shouldBeSame ( '1 + 2 * 3' , '1 + (2 * 3)' ) ;
121
121
} ) ;
122
- it ( 'test assign' , function ( ) {
123
- // https://github.com/glayzzle/php-parser/issues/81
122
+ // https://github.com/glayzzle/php-parser/issues/81
123
+ it ( 'test assign with and' , function ( ) {
124
124
shouldBeSame (
125
125
'$a and $b = $c and $d' ,
126
126
'($a and ($b = $c)) and $d'
127
127
) ;
128
128
} ) ;
129
+ it ( 'test assign list' , function ( ) {
130
+ shouldBeSame (
131
+ '$a = $b = $c' ,
132
+ '($a = ($b = $c))'
133
+ ) ;
134
+ } ) ;
135
+ it ( 'test assign with &&' , function ( ) {
136
+ shouldBeSame (
137
+ '$a && $b = $c && $d' ,
138
+ '$a && ($b = ($c && $d))'
139
+ ) ;
140
+ } ) ;
141
+
129
142
} ) ;
You can’t perform that action at this time.
0 commit comments