@@ -11,14 +11,12 @@ const {
1111 ArrayPrototypeSlice,
1212 ArrayPrototypeSome,
1313 ArrayPrototypeSort,
14- hardenRegExp,
1514 ObjectAssign,
1615 PromisePrototypeThen,
1716 SafePromiseAll,
1817 SafePromiseAllReturnVoid,
1918 SafePromiseAllSettledReturnVoid,
2019 PromiseResolve,
21- RegExpPrototypeSymbolSplit,
2220 SafeMap,
2321 SafeSet,
2422 StringPrototypeIndexOf,
@@ -75,7 +73,6 @@ const {
7573const kFilterArgs = [ '--test' , '--experimental-test-coverage' , '--watch' ] ;
7674const kFilterArgValues = [ '--test-reporter' , '--test-reporter-destination' ] ;
7775const kDiagnosticsFilterArgs = [ 'tests' , 'suites' , 'pass' , 'fail' , 'cancelled' , 'skipped' , 'todo' , 'duration_ms' ] ;
78- const kSplitLine = hardenRegExp ( / \r ? \n / ) ;
7976
8077const kCanceledTests = new SafeSet ( )
8178 . add ( kCancelledByParent ) . add ( kAborted ) . add ( kTestTimeoutFailure ) ;
@@ -301,15 +298,11 @@ class FileTest extends Test {
301298 }
302299
303300 if ( TypedArrayPrototypeGetLength ( nonSerialized ) > 0 ) {
304- const messages = RegExpPrototypeSymbolSplit ( kSplitLine , nonSerialized . toString ( 'utf-8' ) ) ;
305- for ( let i = 0 ; i < messages . length ; i ++ ) {
306- const message = messages [ i ] ;
307- this . addToReport ( {
308- __proto__ : null ,
309- type : 'test:stdout' ,
310- data : { __proto__ : null , file : this . name , message } ,
311- } ) ;
312- }
301+ this . addToReport ( {
302+ __proto__ : null ,
303+ type : 'test:stdout' ,
304+ data : { __proto__ : null , file : this . name , message : nonSerialized . toString ( 'utf-8' ) } ,
305+ } ) ;
313306 }
314307
315308 while ( bufferHead ?. length >= kSerializedSizeHeader ) {
@@ -383,7 +376,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) {
383376 subtest . addToReport ( {
384377 __proto__ : null ,
385378 type : 'test:stderr' ,
386- data : { __proto__ : null , file : path , message : line } ,
379+ data : { __proto__ : null , file : path , message : line + '\n' } ,
387380 } ) ;
388381 } ) ;
389382
0 commit comments