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

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

Issue 937243002: Revert "Revert "Use native async/await support in pub."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
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: {
20 "shared": "any"
21 });
22 builder.serve("shared", "1.2.3", deps: {
23 "other": "any"
24 });
25 builder.serve("unittest", "1.2.3", deps: {
26 "shared": "any"
27 });
28 builder.serve("other", "1.0.0");
29 builder.serve("overridden", "1.0.0");
30 builder.serve("overridden", "2.0.0");
31 builder.serve("override_only", "1.2.3");
32 builder.serve("circular_a", "1.2.3", deps: {
33 "circular_b": "any"
34 });
35 builder.serve("circular_b", "1.2.3", deps: {
36 "circular_a": "any"
37 });
38 });
39
40 d.dir(
41 "from_path",
42 [d.libDir("from_path"), d.libPubspec("from_path", "1.2.3")]).create();
43
44 d.dir(appPath, [d.pubspec({
45 "name": "myapp",
46 "dependencies": {
47 "normal": "any",
48 "overridden": "1.0.0",
49 "from_path": {
50 "path": "../from_path"
51 }
52 },
53 "dev_dependencies": {
54 "unittest": "any"
55 },
56 "dependency_overrides": {
57 "overridden": "2.0.0",
58 "override_only": "any"
59 }
60 })]).create();
61 });
62
63 integration("lists dependencies in compact form", () {
64 pubGet();
65 schedulePub(args: ['deps', '-s', 'compact'], output: '''
66 myapp 0.0.0
67
68 dependencies:
69 - from_path 1.2.3
70 - normal 1.2.3 [transitive circular_a]
71 - overridden 2.0.0
72
73 dev dependencies:
74 - unittest 1.2.3 [shared]
75
76 dependency overrides:
77 - overridden 2.0.0
78 - override_only 1.2.3
79
80 transitive dependencies:
81 - circular_a 1.2.3 [circular_b]
82 - circular_b 1.2.3 [circular_a]
83 - other 1.0.0
84 - shared 1.2.3 [other]
85 - transitive 1.2.3 [shared]
86 ''');
87 });
88
89 integration("lists dependencies in list form", () {
90 pubGet();
91 schedulePub(args: ['deps', '--style', 'list'], output: '''
92 myapp 0.0.0
93
94 dependencies:
95 - from_path 1.2.3
96 - normal 1.2.3
97 - transitive any
98 - circular_a any
99 - overridden 2.0.0
100
101 dev dependencies:
102 - unittest 1.2.3
103 - shared any
104
105 dependency overrides:
106 - overridden 2.0.0
107 - override_only 1.2.3
108
109 transitive dependencies:
110 - circular_a 1.2.3
111 - circular_b any
112 - circular_b 1.2.3
113 - circular_a any
114 - other 1.0.0
115 - shared 1.2.3
116 - other any
117 - transitive 1.2.3
118 - shared any
119 ''');
120 });
121
122 integration("lists dependencies in tree form", () {
123 pubGet();
124 schedulePub(args: ['deps'], output: '''
125 myapp 0.0.0
126 |-- from_path 1.2.3
127 |-- normal 1.2.3
128 | |-- circular_a 1.2.3
129 | | '-- circular_b 1.2.3
130 | | '-- circular_a...
131 | '-- transitive 1.2.3
132 | '-- shared...
133 |-- overridden 2.0.0
134 |-- override_only 1.2.3
135 '-- unittest 1.2.3
136 '-- shared 1.2.3
137 '-- other 1.0.0
138 ''');
139 });
140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698