File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 77@Timeout .factor (2 )
88library ;
99
10+ import 'dart:convert' ;
1011import 'dart:io' ;
1112
1213import 'package:json_serializable/src/check_dependencies.dart' ;
@@ -189,7 +190,7 @@ class SomeClass{}
189190
190191 final output = lines.toString ();
191192 final expectedWarningCount = message == null ? 0 : 1 ;
192- final warningCount = '[WARNING]' .allMatches (output).length;
193+ final warningCount = _warningStartOfLine .allMatches (output).length;
193194 expect (
194195 warningCount,
195196 expectedWarningCount,
@@ -202,10 +203,12 @@ class SomeClass{}
202203 expect (
203204 output,
204205 contains ('''
205- [WARNING] json_serializable on $sourceDirectory /sample.dart:
206- $message ''' ),
206+ W json_serializable on $sourceDirectory /sample.dart:
207+ ${ LineSplitter . split ( message ). map (( line ) => ' $ line ' ). join ( ' \n ' )} ''' ),
207208 );
208209 }
209210
210211 await proc.shouldExit (0 );
211212}
213+
214+ final _warningStartOfLine = RegExp (r'^W ' , multiLine: true );
You can’t perform that action at this time.
0 commit comments