@@ -571,24 +571,26 @@ line 1, column 9 of ${fooTemplateFile.path}: Failed to resolve 's2' as a propert
571
571
var barTemplateFile = getFile ('/project/src/bar.mustache' );
572
572
expect (
573
573
() async => await Template .parse (barTemplateFile),
574
- throwsA (const TypeMatcher <FileSystemException >().having (
575
- (e) => e.message,
576
- 'message' ,
577
- contains ('"${barTemplateFile .path }" does not exist.' ))));
574
+ throwsA (const TypeMatcher <FileSystemException >()
575
+ .having ((e) => e.message, 'message' , contains ('does not exist.' ))));
578
576
});
579
577
580
578
test ('Template parser throws when it cannot read a partial' , () async {
581
579
var barTemplateFile = getFile ('/project/src/bar.mustache' )
582
580
..writeAsStringSync ('Text {{#foo}}{{>missing.mustache}}{{/foo}}' );
583
- var missingTemplateFile = getFile ('/project/src/missing.mustache' );
584
581
expect (
585
582
() async => await Template .parse (barTemplateFile),
586
- throwsA (const TypeMatcher <MustachioResolutionError >()
587
- .having ((e) => e.message, 'message' , contains ('''
588
- line 1, column 14 of ${barTemplateFile .path }: FileSystemException (File "${missingTemplateFile .path }" does not exist.) when reading partial:
583
+ throwsA (const TypeMatcher <MustachioResolutionError >().having (
584
+ (e) => e.message,
585
+ 'message' ,
586
+ allOf (
587
+ contains ('''
588
+ line 1, column 14 of ${barTemplateFile .path }: FileSystemException''' ),
589
+ contains ('''does not exist.''' ),
590
+ contains ('''when reading partial:
589
591
╷
590
592
1 │ Text {{#foo}}{{>missing.mustache}}{{/foo}}
591
593
│ ^^^^^^^^^^^^^^^^^^^^^
592
- ''' ))));
594
+ ''' ))))) ;
593
595
});
594
596
}
0 commit comments