OLD | NEW |
(Empty) | |
| 1 import 'package:scheduled_test/scheduled_stream.dart'; |
| 2 import 'package:scheduled_test/scheduled_test.dart'; |
| 3 import '../../descriptor.dart' as d; |
| 4 import '../../test_pub.dart'; |
| 5 main() { |
| 6 initConfig(); |
| 7 integration('recompiles a script if the SDK version is out-of-date', () { |
| 8 servePackages((builder) { |
| 9 builder.serve( |
| 10 "foo", |
| 11 "1.0.0", |
| 12 contents: [ |
| 13 d.dir("bin", [d.file("script.dart", "main(args) => print('ok');")]
)]); |
| 14 }); |
| 15 schedulePub(args: ["global", "activate", "foo"]); |
| 16 d.dir( |
| 17 cachePath, |
| 18 [ |
| 19 d.dir( |
| 20 'global_packages', |
| 21 [ |
| 22 d.dir( |
| 23 'foo', |
| 24 [d.dir('bin', [d.outOfDateSnapshot('script.dart.snapshot
')])])])]).create(); |
| 25 var pub = pubRun(global: true, args: ["foo:script"]); |
| 26 pub.stdout.expect("Precompiling executables..."); |
| 27 pub.stdout.expect(consumeThrough("ok")); |
| 28 pub.shouldExit(); |
| 29 d.dir( |
| 30 cachePath, |
| 31 [ |
| 32 d.dir( |
| 33 'global_packages', |
| 34 [ |
| 35 d.dir( |
| 36 'foo', |
| 37 [ |
| 38 d.dir( |
| 39 'bin', |
| 40 [d.matcherFile('script.dart.snapshot', contains(
'ok'))])])])]).validate(); |
| 41 }); |
| 42 } |
OLD | NEW |