OLD | NEW |
(Empty) | |
| 1 import '../../lib/src/exit_codes.dart' as exit_codes; |
| 2 import '../descriptor.dart' as d; |
| 3 import '../test_pub.dart'; |
| 4 main() { |
| 5 initConfig(); |
| 6 integration('Errors if the script is in a non-immediate dependency.', () { |
| 7 d.dir( |
| 8 "foo", |
| 9 [ |
| 10 d.libPubspec("foo", "1.0.0"), |
| 11 d.dir("bin", [d.file("bar.dart", "main() => print('foobar');")])]).c
reate(); |
| 12 d.dir("bar", [d.libPubspec("bar", "1.0.0", deps: { |
| 13 "foo": { |
| 14 "path": "../foo" |
| 15 } |
| 16 })]).create(); |
| 17 d.dir(appPath, [d.appPubspec({ |
| 18 "bar": { |
| 19 "path": "../bar" |
| 20 } |
| 21 })]).create(); |
| 22 pubGet(); |
| 23 var pub = pubRun(args: ["foo:script"]); |
| 24 pub.stderr.expect('Package "foo" is not an immediate dependency.'); |
| 25 pub.stderr.expect('Cannot run executables in transitive dependencies.'); |
| 26 pub.shouldExit(exit_codes.DATA); |
| 27 }); |
| 28 } |
OLD | NEW |