OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'package:path/path.dart' as p; | 5 import 'package:path/path.dart' as p; |
6 import 'package:scheduled_test/scheduled_test.dart'; | 6 import 'package:scheduled_test/scheduled_test.dart'; |
7 | 7 |
8 import '../descriptor.dart' as d; | 8 import '../descriptor.dart' as d; |
9 import '../test_pub.dart'; | 9 import '../test_pub.dart'; |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 }); | 28 }); |
29 | 29 |
30 d.appDir({"foo": "any"}).create(); | 30 d.appDir({"foo": "any"}).create(); |
31 | 31 |
32 pubGet(output: contains("Precompiled foo:hello.")); | 32 pubGet(output: contains("Precompiled foo:hello.")); |
33 | 33 |
34 d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [ | 34 d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [ |
35 d.matcherFile('hello.dart.snapshot', contains('hello!')) | 35 d.matcherFile('hello.dart.snapshot', contains('hello!')) |
36 ]).validate(); | 36 ]).validate(); |
37 | 37 |
38 servePackages((builder) { | 38 globalPackageServer.add((builder) { |
39 builder.serve("bar", "1.2.4", contents: [ | 39 builder.serve("bar", "1.2.4", contents: [ |
40 d.dir("lib", [d.file("bar.dart", "final message = 'hello 2!';")]), | 40 d.dir("lib", [d.file("bar.dart", "final message = 'hello 2!';")]), |
41 ]); | 41 ]); |
42 }); | 42 }); |
43 | 43 |
44 pubUpgrade(output: contains("Precompiled foo:hello.")); | 44 pubUpgrade(output: contains("Precompiled foo:hello.")); |
45 | 45 |
46 d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [ | 46 d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [ |
47 d.matcherFile('hello.dart.snapshot', contains('hello 2!')) | 47 d.matcherFile('hello.dart.snapshot', contains('hello 2!')) |
48 ]).validate(); | 48 ]).validate(); |
49 | 49 |
50 var process = pubRun(args: ['foo:hello']); | 50 var process = pubRun(args: ['foo:hello']); |
51 process.stdout.expect("hello 2!"); | 51 process.stdout.expect("hello 2!"); |
52 process.shouldExit(); | 52 process.shouldExit(); |
53 }); | 53 }); |
54 } | 54 } |
OLD | NEW |