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

Side by Side Diff: utils/tests/pub/pub_update_hosted_test.dart

Issue 10981031: Convert raw strings in pub (and apidoc) to new syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to review. Created 8 years, 2 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
« no previous file with comments | « utils/tests/pub/pub_update_git_test.dart ('k') | utils/tests/pub/pub_update_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #library('pub_tests'); 5 #library('pub_tests');
6 6
7 #import('dart:io'); 7 #import('dart:io');
8 8
9 #import('test_pub.dart'); 9 #import('test_pub.dart');
10 #import('../../../pkg/unittest/unittest.dart'); 10 #import('../../../pkg/unittest/unittest.dart');
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 test("updates one locked pub server package's dependencies if it's " 48 test("updates one locked pub server package's dependencies if it's "
49 "necessary", () { 49 "necessary", () {
50 servePackages([ 50 servePackages([
51 package("foo", "1.0.0", [dependency("foo-dep")]), 51 package("foo", "1.0.0", [dependency("foo-dep")]),
52 package("foo-dep", "1.0.0") 52 package("foo-dep", "1.0.0")
53 ]); 53 ]);
54 54
55 appDir([dependency("foo")]).scheduleCreate(); 55 appDir([dependency("foo")]).scheduleCreate();
56 56
57 schedulePub(args: ['install'], 57 schedulePub(args: ['install'],
58 output: const RegExp(@"Dependencies installed!$")); 58 output: const RegExp(r"Dependencies installed!$"));
59 59
60 packagesDir({ 60 packagesDir({
61 "foo": "1.0.0", 61 "foo": "1.0.0",
62 "foo-dep": "1.0.0" 62 "foo-dep": "1.0.0"
63 }).scheduleValidate(); 63 }).scheduleValidate();
64 64
65 servePackages([ 65 servePackages([
66 package("foo", "2.0.0", [dependency("foo-dep", ">1.0.0")]), 66 package("foo", "2.0.0", [dependency("foo-dep", ">1.0.0")]),
67 package("foo-dep", "2.0.0") 67 package("foo-dep", "2.0.0")
68 ]); 68 ]);
69 69
70 schedulePub(args: ['update', 'foo'], 70 schedulePub(args: ['update', 'foo'],
71 output: const RegExp(@"Dependencies updated!$")); 71 output: const RegExp(r"Dependencies updated!$"));
72 72
73 packagesDir({ 73 packagesDir({
74 "foo": "2.0.0", 74 "foo": "2.0.0",
75 "foo-dep": "2.0.0" 75 "foo-dep": "2.0.0"
76 }).scheduleValidate(); 76 }).scheduleValidate();
77 77
78 run(); 78 run();
79 }); 79 });
80 80
81 test("updates a locked package's dependers in order to get it to max " 81 test("updates a locked package's dependers in order to get it to max "
82 "version", () { 82 "version", () {
83 servePackages([ 83 servePackages([
84 package("foo", "1.0.0", [dependency("bar", "<2.0.0")]), 84 package("foo", "1.0.0", [dependency("bar", "<2.0.0")]),
85 package("bar", "1.0.0") 85 package("bar", "1.0.0")
86 ]); 86 ]);
87 87
88 appDir([dependency("foo"), dependency("bar")]).scheduleCreate(); 88 appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
89 89
90 schedulePub(args: ['install'], 90 schedulePub(args: ['install'],
91 output: const RegExp(@"Dependencies installed!$")); 91 output: const RegExp(r"Dependencies installed!$"));
92 92
93 packagesDir({ 93 packagesDir({
94 "foo": "1.0.0", 94 "foo": "1.0.0",
95 "bar": "1.0.0" 95 "bar": "1.0.0"
96 }).scheduleValidate(); 96 }).scheduleValidate();
97 97
98 servePackages([ 98 servePackages([
99 package("foo", "2.0.0", [dependency("bar", "<3.0.0")]), 99 package("foo", "2.0.0", [dependency("bar", "<3.0.0")]),
100 package("bar", "2.0.0") 100 package("bar", "2.0.0")
101 ]); 101 ]);
102 102
103 schedulePub(args: ['update', 'bar'], 103 schedulePub(args: ['update', 'bar'],
104 output: const RegExp(@"Dependencies updated!$")); 104 output: const RegExp(r"Dependencies updated!$"));
105 105
106 packagesDir({ 106 packagesDir({
107 "foo": "2.0.0", 107 "foo": "2.0.0",
108 "bar": "2.0.0" 108 "bar": "2.0.0"
109 }).scheduleValidate(); 109 }).scheduleValidate();
110 110
111 run(); 111 run();
112 }); 112 });
113 113
114 test("removes a dependency that's been removed from the pubspec", () { 114 test("removes a dependency that's been removed from the pubspec", () {
115 servePackages([ 115 servePackages([
116 package("foo", "1.0.0"), 116 package("foo", "1.0.0"),
117 package("bar", "1.0.0") 117 package("bar", "1.0.0")
118 ]); 118 ]);
119 119
120 appDir([dependency("foo"), dependency("bar")]).scheduleCreate(); 120 appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
121 121
122 schedulePub(args: ['update'], 122 schedulePub(args: ['update'],
123 output: const RegExp(@"Dependencies updated!$")); 123 output: const RegExp(r"Dependencies updated!$"));
124 124
125 packagesDir({ 125 packagesDir({
126 "foo": "1.0.0", 126 "foo": "1.0.0",
127 "bar": "1.0.0" 127 "bar": "1.0.0"
128 }).scheduleValidate(); 128 }).scheduleValidate();
129 129
130 appDir([dependency("foo")]).scheduleCreate(); 130 appDir([dependency("foo")]).scheduleCreate();
131 131
132 schedulePub(args: ['update'], 132 schedulePub(args: ['update'],
133 output: const RegExp(@"Dependencies updated!$")); 133 output: const RegExp(r"Dependencies updated!$"));
134 134
135 packagesDir({ 135 packagesDir({
136 "foo": "1.0.0", 136 "foo": "1.0.0",
137 "bar": null 137 "bar": null
138 }).scheduleValidate(); 138 }).scheduleValidate();
139 139
140 run(); 140 run();
141 }); 141 });
142 142
143 test("removes a transitive dependency that's no longer depended on", () { 143 test("removes a transitive dependency that's no longer depended on", () {
144 servePackages([ 144 servePackages([
145 package("foo", "1.0.0", [dependency("shared-dep")]), 145 package("foo", "1.0.0", [dependency("shared-dep")]),
146 package("bar", "1.0.0", [ 146 package("bar", "1.0.0", [
147 dependency("shared-dep"), 147 dependency("shared-dep"),
148 dependency("bar-dep") 148 dependency("bar-dep")
149 ]), 149 ]),
150 package("shared-dep", "1.0.0"), 150 package("shared-dep", "1.0.0"),
151 package("bar-dep", "1.0.0") 151 package("bar-dep", "1.0.0")
152 ]); 152 ]);
153 153
154 appDir([dependency("foo"), dependency("bar")]).scheduleCreate(); 154 appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
155 155
156 schedulePub(args: ['update'], 156 schedulePub(args: ['update'],
157 output: const RegExp(@"Dependencies updated!$")); 157 output: const RegExp(r"Dependencies updated!$"));
158 158
159 packagesDir({ 159 packagesDir({
160 "foo": "1.0.0", 160 "foo": "1.0.0",
161 "bar": "1.0.0", 161 "bar": "1.0.0",
162 "shared-dep": "1.0.0", 162 "shared-dep": "1.0.0",
163 "bar-dep": "1.0.0", 163 "bar-dep": "1.0.0",
164 }).scheduleValidate(); 164 }).scheduleValidate();
165 165
166 appDir([dependency("foo")]).scheduleCreate(); 166 appDir([dependency("foo")]).scheduleCreate();
167 167
168 schedulePub(args: ['update'], 168 schedulePub(args: ['update'],
169 output: const RegExp(@"Dependencies updated!$")); 169 output: const RegExp(r"Dependencies updated!$"));
170 170
171 packagesDir({ 171 packagesDir({
172 "foo": "1.0.0", 172 "foo": "1.0.0",
173 "bar": null, 173 "bar": null,
174 "shared-dep": "1.0.0", 174 "shared-dep": "1.0.0",
175 "bar-dep": null, 175 "bar-dep": null,
176 }).scheduleValidate(); 176 }).scheduleValidate();
177 177
178 run(); 178 run();
179 }); 179 });
180 180
181 test("updates dependencies whose constraints have been removed", () { 181 test("updates dependencies whose constraints have been removed", () {
182 servePackages([ 182 servePackages([
183 package("foo", "1.0.0", [dependency("shared-dep")]), 183 package("foo", "1.0.0", [dependency("shared-dep")]),
184 package("bar", "1.0.0", [dependency("shared-dep", "<2.0.0")]), 184 package("bar", "1.0.0", [dependency("shared-dep", "<2.0.0")]),
185 package("shared-dep", "1.0.0"), 185 package("shared-dep", "1.0.0"),
186 package("shared-dep", "2.0.0") 186 package("shared-dep", "2.0.0")
187 ]); 187 ]);
188 188
189 appDir([dependency("foo"), dependency("bar")]).scheduleCreate(); 189 appDir([dependency("foo"), dependency("bar")]).scheduleCreate();
190 190
191 schedulePub(args: ['update'], 191 schedulePub(args: ['update'],
192 output: const RegExp(@"Dependencies updated!$")); 192 output: const RegExp(r"Dependencies updated!$"));
193 193
194 packagesDir({ 194 packagesDir({
195 "foo": "1.0.0", 195 "foo": "1.0.0",
196 "bar": "1.0.0", 196 "bar": "1.0.0",
197 "shared-dep": "1.0.0" 197 "shared-dep": "1.0.0"
198 }).scheduleValidate(); 198 }).scheduleValidate();
199 199
200 appDir([dependency("foo")]).scheduleCreate(); 200 appDir([dependency("foo")]).scheduleCreate();
201 201
202 schedulePub(args: ['update'], 202 schedulePub(args: ['update'],
203 output: const RegExp(@"Dependencies updated!$")); 203 output: const RegExp(r"Dependencies updated!$"));
204 204
205 packagesDir({ 205 packagesDir({
206 "foo": "1.0.0", 206 "foo": "1.0.0",
207 "bar": null, 207 "bar": null,
208 "shared-dep": "2.0.0" 208 "shared-dep": "2.0.0"
209 }).scheduleValidate(); 209 }).scheduleValidate();
210 210
211 run(); 211 run();
212 }); 212 });
213 } 213 }
OLDNEW
« no previous file with comments | « utils/tests/pub/pub_update_git_test.dart ('k') | utils/tests/pub/pub_update_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698