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 7
7
@Timeout .factor (2 )
8
8
library ;
9
9
10
+ import 'dart:convert' ;
10
11
import 'dart:io' ;
11
12
12
13
import 'package:json_serializable/src/check_dependencies.dart' ;
@@ -189,7 +190,7 @@ class SomeClass{}
189
190
190
191
final output = lines.toString ();
191
192
final expectedWarningCount = message == null ? 0 : 1 ;
192
- final warningCount = '[WARNING]' .allMatches (output).length;
193
+ final warningCount = _warningStartOfLine .allMatches (output).length;
193
194
expect (
194
195
warningCount,
195
196
expectedWarningCount,
@@ -202,10 +203,12 @@ class SomeClass{}
202
203
expect (
203
204
output,
204
205
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 ' )} ''' ),
207
208
);
208
209
}
209
210
210
211
await proc.shouldExit (0 );
211
212
}
213
+
214
+ final _warningStartOfLine = RegExp (r'^W ' , multiLine: true );
You can’t perform that action at this time.
0 commit comments