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 Git repo', () { | |
13 ensureGit(); | |
14 | |
15 d.git( | |
16 'foo.git', | |
17 [ | |
18 d.libPubspec("foo", "1.0.0"), | |
19 d.dir( | |
20 "bin", | |
21 [ | |
22 d.file("hello.dart", "void main() => print('hello!');"), | |
23 d.file("goodbye.dart", "void main() => print('goodbye!');"), | |
24 d.file("shell.sh", "echo shell"), | |
25 d.dir( | |
26 "subdir", | |
27 [d.file("sub.dart", "void main() => print('sub!');")])])
]).create(); | |
28 | |
29 schedulePub( | |
30 args: ["global", "activate", "-sgit", "../foo.git"], | |
31 output: allOf( | |
32 [contains('Precompiled foo:hello.'), contains("Precompiled foo:goodb
ye.")])); | |
33 | |
34 d.dir( | |
35 cachePath, | |
36 [ | |
37 d.dir( | |
38 'global_packages', | |
39 [ | |
40 d.dir( | |
41 'foo', | |
42 [ | |
43 d.matcherFile('pubspec.lock', contains('1.0.0')), | |
44 d.dir( | |
45 'bin', | |
46 [ | |
47 d.matcherFile('hello.dart.snapshot', contain
s('hello!')), | |
48 d.matcherFile('goodbye.dart.snapshot', conta
ins('goodbye!')), | |
49 d.nothing('shell.sh.snapshot'), | |
50 d.nothing('subdir')])])])]).validate(); | |
51 }); | |
52 } | |
OLD | NEW |