OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 'descriptor.dart' as d; | 5 import 'descriptor.dart' as d; |
6 import 'test_pub.dart'; | 6 import 'test_pub.dart'; |
7 | 7 |
8 main() { | 8 main() { |
9 integration("includes root package's dev dependencies", () { | 9 integration("includes root package's dev dependencies", () { |
10 d.dir('foo', [ | 10 d.dir('foo', [ |
(...skipping 11 matching lines...) Expand all Loading... |
22 "name": "myapp", | 22 "name": "myapp", |
23 "dev_dependencies": { | 23 "dev_dependencies": { |
24 "foo": {"path": "../foo"}, | 24 "foo": {"path": "../foo"}, |
25 "bar": {"path": "../bar"}, | 25 "bar": {"path": "../bar"}, |
26 } | 26 } |
27 }) | 27 }) |
28 ]).create(); | 28 ]).create(); |
29 | 29 |
30 pubGet(); | 30 pubGet(); |
31 | 31 |
32 d.dir(packagesPath, [ | 32 d.appPackagesFile({ |
33 d.dir("foo", [ | 33 "foo": "../foo", |
34 d.file("foo.dart", 'main() => "foo";') | 34 "bar": "../bar" |
35 ]), | 35 }).validate(); |
36 d.dir("bar", [ | |
37 d.file("bar.dart", 'main() => "bar";') | |
38 ]) | |
39 ]).validate(); | |
40 }); | 36 }); |
41 | 37 |
42 integration("includes dev dependency's transitive dependencies", () { | 38 integration("includes dev dependency's transitive dependencies", () { |
43 d.dir('foo', [ | 39 d.dir('foo', [ |
44 d.libDir('foo'), | 40 d.libDir('foo'), |
45 d.libPubspec('foo', '0.0.1', deps: { | 41 d.libPubspec('foo', '0.0.1', deps: { |
46 "bar": {"path": "../bar"} | 42 "bar": {"path": "../bar"} |
47 }) | 43 }) |
48 ]).create(); | 44 ]).create(); |
49 | 45 |
50 d.dir('bar', [ | 46 d.dir('bar', [ |
51 d.libDir('bar'), | 47 d.libDir('bar'), |
52 d.libPubspec('bar', '0.0.1') | 48 d.libPubspec('bar', '0.0.1') |
53 ]).create(); | 49 ]).create(); |
54 | 50 |
55 d.dir(appPath, [ | 51 d.dir(appPath, [ |
56 d.pubspec({ | 52 d.pubspec({ |
57 "name": "myapp", | 53 "name": "myapp", |
58 "dev_dependencies": { | 54 "dev_dependencies": { |
59 "foo": {"path": "../foo"} | 55 "foo": {"path": "../foo"} |
60 } | 56 } |
61 }) | 57 }) |
62 ]).create(); | 58 ]).create(); |
63 | 59 |
64 pubGet(); | 60 pubGet(); |
65 | 61 |
66 d.dir(packagesPath, [ | 62 d.appPackagesFile({ |
67 d.dir("foo", [ | 63 "foo": "../foo", |
68 d.file("foo.dart", 'main() => "foo";') | 64 "bar": "../bar" |
69 ]), | 65 }).validate(); |
70 d.dir("bar", [ | |
71 d.file("bar.dart", 'main() => "bar";') | |
72 ]) | |
73 ]).validate(); | |
74 }); | 66 }); |
75 | 67 |
76 integration("ignores transitive dependency's dev dependencies", () { | 68 integration("ignores transitive dependency's dev dependencies", () { |
77 d.dir('foo', [ | 69 d.dir('foo', [ |
78 d.libDir('foo'), | 70 d.libDir('foo'), |
79 d.pubspec({ | 71 d.pubspec({ |
80 "name": "foo", | 72 "name": "foo", |
81 "version": "0.0.1", | 73 "version": "0.0.1", |
82 "dev_dependencies": { | 74 "dev_dependencies": { |
83 "bar": {"path": "../bar"} | 75 "bar": {"path": "../bar"} |
84 } | 76 } |
85 }) | 77 }) |
86 ]).create(); | 78 ]).create(); |
87 | 79 |
88 d.dir('bar', [ | 80 d.dir('bar', [ |
89 d.libDir('bar'), | 81 d.libDir('bar'), |
90 d.libPubspec('bar', '0.0.1') | 82 d.libPubspec('bar', '0.0.1') |
91 ]).create(); | 83 ]).create(); |
92 | 84 |
93 d.dir(appPath, [ | 85 d.dir(appPath, [ |
94 d.appPubspec({ | 86 d.appPubspec({ |
95 "foo": {"path": "../foo"} | 87 "foo": {"path": "../foo"} |
96 }) | 88 }) |
97 ]).create(); | 89 ]).create(); |
98 | 90 |
99 pubGet(); | 91 pubGet(); |
100 | 92 |
101 d.dir(packagesPath, [ | 93 d.appPackagesFile({ |
102 d.dir("foo", [ | 94 "foo": "../foo" |
103 d.file("foo.dart", 'main() => "foo";') | 95 }).validate(); |
104 ]), | |
105 d.nothing("bar") | |
106 ]).validate(); | |
107 }); | 96 }); |
108 } | 97 } |
OLD | NEW |