File tree 2 files changed +20
-1
lines changed 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ abstract class Validator {
219
219
return files
220
220
.where (
221
221
recursive
222
- ? (file) => p.canonicalize (file). startsWith ( base )
222
+ ? (file) => p.isWithin ( base , p. canonicalize (file))
223
223
: (file) => p.canonicalize (p.dirname (file)) == base ,
224
224
)
225
225
.toList ();
Original file line number Diff line number Diff line change @@ -55,6 +55,25 @@ void main() {
55
55
await expectValidationDeprecated (strictDeps);
56
56
});
57
57
58
+ // Regression test of https://github.com/dart-lang/pub/issues/4115 .
59
+ test ('imports a dev_dependency in bindings_generator/' , () async {
60
+ await d.dir (appPath, [
61
+ d.libPubspec (
62
+ 'test_pkg' ,
63
+ '1.0.0' ,
64
+ devDeps: {'silly_monkey' : '^1.2.3' },
65
+ sdk: '>=1.8.0 <2.0.0' ,
66
+ ),
67
+ d.dir ('bindings_generator' , [
68
+ d.file ('library.dart' , r'''
69
+ export 'package:silly_monkey/silly_monkey.dart';
70
+ ''' ),
71
+ ]),
72
+ ]).create ();
73
+
74
+ await expectValidationDeprecated (strictDeps);
75
+ });
76
+
58
77
test ('declares an "import" as a dependency in bin/' , () async {
59
78
await d.dir (appPath, [
60
79
d.libPubspec (
You can’t perform that action at this time.
0 commit comments