Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1445)

Side by Side Diff: sdk/lib/_internal/pub/test/deps_test.dart

Issue 1165473002: Start pulling pub from its own repo. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review changes Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
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
13 setUp(() {
14 servePackages((builder) {
15 builder.serve("normal", "1.2.3", deps: {
16 "transitive": "any",
17 "circular_a": "any"
18 });
19 builder.serve("transitive", "1.2.3", deps: {"shared": "any"});
20 builder.serve("shared", "1.2.3", deps: {"other": "any"});
21 builder.serve("unittest", "1.2.3", deps: {"shared": "any"});
22 builder.serve("other", "1.0.0");
23 builder.serve("overridden", "1.0.0");
24 builder.serve("overridden", "2.0.0");
25 builder.serve("override_only", "1.2.3");
26 builder.serve("circular_a", "1.2.3", deps: {"circular_b": "any"});
27 builder.serve("circular_b", "1.2.3", deps: {"circular_a": "any"});
28 });
29
30 d.dir("from_path", [
31 d.libDir("from_path"),
32 d.libPubspec("from_path", "1.2.3")
33 ]).create();
34
35 d.dir(appPath, [
36 d.pubspec({
37 "name": "myapp",
38 "dependencies": {
39 "normal": "any",
40 "overridden": "1.0.0",
41 "from_path": {"path": "../from_path"}
42 },
43 "dev_dependencies": {
44 "unittest": "any"
45 },
46 "dependency_overrides": {
47 "overridden": "2.0.0",
48 "override_only": "any"
49 }
50 })
51 ]).create();
52 });
53
54 integration("lists dependencies in compact form", () {
55 pubGet();
56 schedulePub(args: ['deps', '-s', 'compact'], output: '''
57 myapp 0.0.0
58
59 dependencies:
60 - from_path 1.2.3
61 - normal 1.2.3 [transitive circular_a]
62 - overridden 2.0.0
63
64 dev dependencies:
65 - unittest 1.2.3 [shared]
66
67 dependency overrides:
68 - overridden 2.0.0
69 - override_only 1.2.3
70
71 transitive dependencies:
72 - circular_a 1.2.3 [circular_b]
73 - circular_b 1.2.3 [circular_a]
74 - other 1.0.0
75 - shared 1.2.3 [other]
76 - transitive 1.2.3 [shared]
77 ''');
78 });
79
80 integration("lists dependencies in list form", () {
81 pubGet();
82 schedulePub(args: ['deps', '--style', 'list'], output: '''
83 myapp 0.0.0
84
85 dependencies:
86 - from_path 1.2.3
87 - normal 1.2.3
88 - transitive any
89 - circular_a any
90 - overridden 2.0.0
91
92 dev dependencies:
93 - unittest 1.2.3
94 - shared any
95
96 dependency overrides:
97 - overridden 2.0.0
98 - override_only 1.2.3
99
100 transitive dependencies:
101 - circular_a 1.2.3
102 - circular_b any
103 - circular_b 1.2.3
104 - circular_a any
105 - other 1.0.0
106 - shared 1.2.3
107 - other any
108 - transitive 1.2.3
109 - shared any
110 ''');
111 });
112
113 integration("lists dependencies in tree form", () {
114 pubGet();
115 schedulePub(args: ['deps'], output: '''
116 myapp 0.0.0
117 |-- from_path 1.2.3
118 |-- normal 1.2.3
119 | |-- circular_a 1.2.3
120 | | '-- circular_b 1.2.3
121 | | '-- circular_a...
122 | '-- transitive 1.2.3
123 | '-- shared...
124 |-- overridden 2.0.0
125 |-- override_only 1.2.3
126 '-- unittest 1.2.3
127 '-- shared 1.2.3
128 '-- other 1.0.0
129 ''');
130 });
131 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/test/dependency_override_test.dart ('k') | sdk/lib/_internal/pub/test/descriptor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698