OLD | NEW |
1 import 'package:scheduled_test/scheduled_test.dart'; | 1 import 'package:scheduled_test/scheduled_test.dart'; |
2 import '../../descriptor.dart' as d; | 2 import '../../descriptor.dart' as d; |
3 import '../../test_pub.dart'; | 3 import '../../test_pub.dart'; |
| 4 import 'utils.dart'; |
4 main() { | 5 main() { |
5 initConfig(); | 6 initConfig(); |
6 integration("the binstubs runs pub global run if there is no snapshot", () { | 7 integration("the binstubs runs pub global run if there is no snapshot", () { |
7 d.dir("foo", [d.pubspec({ | 8 d.dir("foo", [d.pubspec({ |
8 "name": "foo", | 9 "name": "foo", |
9 "executables": { | 10 "executables": { |
10 "foo-script": "script" | 11 "foo-script": "script" |
11 } | 12 } |
12 }), | 13 }), |
13 d.dir("bin", [d.file("script.dart", "main() => print('ok');")])]).crea
te(); | 14 d.dir("bin", [d.file("script.dart", "main() => print('ok');")])]).crea
te(); |
14 schedulePub( | 15 schedulePub( |
15 args: ["global", "activate", "--source", "path", "../foo"], | 16 args: ["global", "activate", "--source", "path", "../foo"], |
16 output: contains("Installed executable foo-script.")); | 17 output: contains("Installed executable foo-script.")); |
17 d.dir( | 18 d.dir( |
18 cachePath, | 19 cachePath, |
19 [ | 20 [ |
20 d.dir( | 21 d.dir( |
21 "bin", | 22 "bin", |
22 [ | 23 [ |
23 d.matcherFile( | 24 d.matcherFile( |
24 "foo-script", | 25 binStubName("foo-script"), |
25 contains("pub global run foo:script"))])]).validate(); | 26 contains("pub global run foo:script"))])]).validate(); |
26 }); | 27 }); |
27 } | 28 } |
OLD | NEW |