@@ -116,7 +116,7 @@ describe('pmd-github-action-util', function () {
116116 const report = JSON . parse ( await fs . readFile ( reportFile , 'utf8' ) ) ;
117117 expect ( report . runs [ 0 ] . tool . driver . version ) . toBe ( '6.40.0' ) ;
118118 expect ( execOutput . exitCode ) . toBe ( 0 ) ;
119- expect ( execOutput . stdout ) . toBe ( 'Running PMD 6.40.0 with: pmd -no-cache -d . -f sarif -R ruleset.xml -r pmd-report.sarif\n ' ) ;
119+ expect ( execOutput . stdout . trim ( ) ) . toBe ( 'Running PMD 6.40.0 with: pmd -no-cache -d . -f sarif -R ruleset.xml -r pmd-report.sarif' ) ;
120120 await io . rmRF ( reportFile )
121121 } )
122122
@@ -137,7 +137,7 @@ describe('pmd-github-action-util', function () {
137137 const report = JSON . parse ( await fs . readFile ( reportFile , 'utf8' ) ) ;
138138 expect ( report . runs [ 0 ] . tool . driver . version ) . toBe ( '6.41.0' ) ;
139139 expect ( execOutput . exitCode ) . toBe ( 0 ) ;
140- expect ( execOutput . stdout ) . toBe ( 'Running PMD 6.41.0 with: pmd --no-cache -d . -f sarif -R ruleset.xml -r pmd-report.sarif\n ' ) ;
140+ expect ( execOutput . stdout . trim ( ) ) . toBe ( 'Running PMD 6.41.0 with: pmd --no-cache -d . -f sarif -R ruleset.xml -r pmd-report.sarif' ) ;
141141 await io . rmRF ( reportFile ) ;
142142 } )
143143
@@ -239,7 +239,7 @@ describe('pmd-github-action-util', function () {
239239 const pmdFilelistContent = await fs . readFile ( pmdFilelist , 'utf8' ) ;
240240 expect ( pmdFilelistContent ) . toBe ( 'src/file1.txt,src/file2.txt' ) ;
241241 expect ( execOutput . exitCode ) . toBe ( 0 ) ;
242- expect ( execOutput . stdout ) . toBe ( 'Running PMD 6.40.0 with: pmd -no-cache -filelist pmd.filelist -f sarif -R ruleset.xml -r pmd-report.sarif\n ' ) ;
242+ expect ( execOutput . stdout . trim ( ) ) . toBe ( 'Running PMD 6.40.0 with: pmd -no-cache -filelist pmd.filelist -f sarif -R ruleset.xml -r pmd-report.sarif' ) ;
243243 await io . rmRF ( pmdFilelist ) ;
244244 await io . rmRF ( path . join ( '.' , 'pmd-report.sarif' ) ) ;
245245 } )
@@ -261,7 +261,7 @@ describe('pmd-github-action-util', function () {
261261 const pmdFilelistContent = await fs . readFile ( pmdFilelist , 'utf8' ) ;
262262 expect ( pmdFilelistContent ) . toBe ( 'src/file1.txt,src/file2.txt' ) ;
263263 expect ( execOutput . exitCode ) . toBe ( 0 ) ;
264- expect ( execOutput . stdout ) . toBe ( 'Running PMD 6.41.0 with: pmd --no-cache --file-list pmd.filelist -f sarif -R ruleset.xml -r pmd-report.sarif\n ' ) ;
264+ expect ( execOutput . stdout . trim ( ) ) . toBe ( 'Running PMD 6.41.0 with: pmd --no-cache --file-list pmd.filelist -f sarif -R ruleset.xml -r pmd-report.sarif' ) ;
265265 await io . rmRF ( pmdFilelist ) ;
266266 await io . rmRF ( path . join ( '.' , 'pmd-report.sarif' ) ) ;
267267 } )
0 commit comments