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