OLD | NEW |
1 import 'package:path/path.dart' as p; | 1 import 'package:path/path.dart' as p; |
2 import '../../descriptor.dart' as d; | 2 import '../../descriptor.dart' as d; |
3 import '../../test_pub.dart'; | 3 import '../../test_pub.dart'; |
4 main() { | 4 main() { |
5 initConfig(); | 5 initConfig(); |
6 integration("errors if an executable's script can't be found", () { | 6 integration("errors if an executable's script can't be found", () { |
7 d.dir("foo", [d.pubspec({ | 7 d.dir("foo", [d.pubspec({ |
8 "name": "foo", | 8 "name": "foo", |
9 "executables": { | 9 "executables": { |
10 "missing": "not_here", | 10 "missing": "not_here", |
11 "nope": null | 11 "nope": null |
12 } | 12 } |
13 })]).create(); | 13 })]).create(); |
14 var pub = startPub(args: ["global", "activate", "-spath", "../foo"]); | 14 var pub = startPub(args: ["global", "activate", "-spath", "../foo"]); |
15 pub.stderr.expect( | 15 pub.stderr.expect( |
16 'Warning: Executable "missing" runs ' | 16 'Warning: Executable "missing" runs ' |
17 '"bin/not_here.dart", which was not found in foo.'); | 17 '"${p.join('bin', 'not_here.dart')}", which was not found in foo.'); |
18 pub.stderr.expect( | 18 pub.stderr.expect( |
19 'Warning: Executable "nope" runs ' | 19 'Warning: Executable "nope" runs ' |
20 '"${p.join('bin', 'nope.dart')}", which was not found in foo.'); | 20 '"${p.join('bin', 'nope.dart')}", which was not found in foo.'); |
21 pub.shouldExit(); | 21 pub.shouldExit(); |
22 }); | 22 }); |
23 } | 23 } |
OLD | NEW |