@@ -571,24 +571,26 @@ line 1, column 9 of ${fooTemplateFile.path}: Failed to resolve 's2' as a propert
571571 var barTemplateFile = getFile ('/project/src/bar.mustache' );
572572 expect (
573573 () 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.' ))));
578576 });
579577
580578 test ('Template parser throws when it cannot read a partial' , () async {
581579 var barTemplateFile = getFile ('/project/src/bar.mustache' )
582580 ..writeAsStringSync ('Text {{#foo}}{{>missing.mustache}}{{/foo}}' );
583- var missingTemplateFile = getFile ('/project/src/missing.mustache' );
584581 expect (
585582 () 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:
589591 ╷
5905921 │ Text {{#foo}}{{>missing.mustache}}{{/foo}}
591593 │ ^^^^^^^^^^^^^^^^^^^^^
592- ''' ))));
594+ ''' ))))) ;
593595 });
594596}
0 commit comments