File tree 3 files changed +21
-1
lines changed
3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
- Document deduplication behavior for the output of
4
4
` GeneratorForAnnotation.generateForAnnotatedElement ` .
5
+ - Support all the glob quotes.
5
6
6
7
## 1.5.0
7
8
Original file line number Diff line number Diff line change @@ -82,7 +82,8 @@ class CombiningBuilder implements Builder {
82
82
@override
83
83
Future <void > build (BuildStep buildStep) async {
84
84
// Pattern used for `findAssets`, which must be glob-compatible
85
- final pattern = buildStep.inputId.changeExtension ('.*$_partFiles ' ).path;
85
+ final assetPath = buildStep.inputId.path;
86
+ final pattern = '${p .withoutExtension (Glob .quote (assetPath ))}.*$_partFiles ' ;
86
87
87
88
final inputBaseName =
88
89
p.basenameWithoutExtension (buildStep.inputId.pathSegments.last);
Original file line number Diff line number Diff line change @@ -799,6 +799,24 @@ foo generated content
799
799
);
800
800
});
801
801
});
802
+
803
+ test ('supports the path with the glob quotes' , () async {
804
+ await testBuilder (
805
+ const CombiningBuilder (),
806
+ {
807
+ '$_pkgName |lib/[a]/(b)/{c}/*d/-e/f.dart' :
808
+ 'library f; part "f.g.dart";' ,
809
+ '$_pkgName |lib/[a]/(b)/{c}/*d/-e/f.foo.g.part' :
810
+ 'some generated content' ,
811
+ },
812
+ generateFor: {'$_pkgName |lib/[a]/(b)/{c}/*d/-e/f.dart' },
813
+ outputs: {
814
+ '$_pkgName |lib/[a]/(b)/{c}/*d/-e/f.g.dart' : decodedMatches (
815
+ startsWith ('// GENERATED CODE - DO NOT MODIFY BY HAND' ),
816
+ ),
817
+ },
818
+ );
819
+ });
802
820
});
803
821
804
822
test ('can skip formatting with a trivial lambda' , () async {
You can’t perform that action at this time.
0 commit comments