OLD | NEW |
(Empty) | |
| 1 import 'package:scheduled_test/scheduled_test.dart'; |
| 2 import '../../descriptor.dart' as d; |
| 3 import '../../test_pub.dart'; |
| 4 main() { |
| 5 initConfig(); |
| 6 integration('snapshots the executables for a hosted package', () { |
| 7 servePackages((builder) { |
| 8 builder.serve( |
| 9 "foo", |
| 10 "1.0.0", |
| 11 contents: [ |
| 12 d.dir( |
| 13 'bin', |
| 14 [ |
| 15 d.file("hello.dart", "void main() => print('hello!');"), |
| 16 d.file("goodbye.dart", "void main() => print('goodbye!');"
), |
| 17 d.file("shell.sh", "echo shell"), |
| 18 d.dir("subdir", [d.file("sub.dart", "void main() => print(
'sub!');")])])]); |
| 19 }); |
| 20 schedulePub( |
| 21 args: ["global", "activate", "foo"], |
| 22 output: allOf( |
| 23 [contains('Precompiled foo:hello.'), contains("Precompiled foo:goodb
ye.")])); |
| 24 d.dir( |
| 25 cachePath, |
| 26 [ |
| 27 d.dir( |
| 28 'global_packages', |
| 29 [ |
| 30 d.dir( |
| 31 'foo', |
| 32 [ |
| 33 d.matcherFile('pubspec.lock', contains('1.0.0')), |
| 34 d.dir( |
| 35 'bin', |
| 36 [ |
| 37 d.matcherFile('hello.dart.snapshot', contain
s('hello!')), |
| 38 d.matcherFile('goodbye.dart.snapshot', conta
ins('goodbye!')), |
| 39 d.nothing('shell.sh.snapshot'), |
| 40 d.nothing('subdir')])])])]).validate(); |
| 41 }); |
| 42 } |
OLD | NEW |