File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "displayName" : " PHPUnit Test Explorer" ,
55 "icon" : " img/icon.png" ,
66 "publisher" : " recca0120" ,
7- "version" : " 3.5.35 " ,
7+ "version" : " 3.5.36 " ,
88 "private" : true ,
99 "license" : " MIT" ,
1010 "repository" : {
Original file line number Diff line number Diff line change @@ -124,8 +124,13 @@ export abstract class Printer {
124124
125125 const name = 'name' in result ? result . name : '' ;
126126 const message = 'message' in result ? result . message : '' ;
127- const matched = message . match ( / T h i s \s t e s t \s p r i n t e d \s o u t p u t : ( .* ) / ) ;
128- const text = ! matched ? this . outputBuffer . get ( name ) : matched [ 1 ] . trim ( ) ;
127+
128+ const pattern = [
129+ 'This test printed output' ,
130+ 'Test code or tested code printed unexpected output' ,
131+ ] . join ( '|' ) ;
132+ const matched = message . match ( new RegExp ( `(${ pattern } ):(?<output>.*)` , 'i' ) ) ;
133+ const text = ! matched ? this . outputBuffer . get ( name ) : matched ?. groups ! . output . trim ( ) ;
129134
130135 return text ? `${ icon } ${ text } ` : undefined ;
131136 }
You can’t perform that action at this time.
0 commit comments