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

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

Issue 14762003: Put "packages" directories in "benchmark". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Show validation warning on "benchmarks". Created 7 years, 7 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS d.file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS d.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 d.file. 3 // BSD-style license that can be found in the LICENSE d.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 'package:pathos/path.dart' as path; 9 import 'package:pathos/path.dart' as path;
10 import 'package:scheduled_test/scheduled_test.dart'; 10 import 'package:scheduled_test/scheduled_test.dart';
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 schedulePub(args: ['install'], 166 schedulePub(args: ['install'],
167 output: new RegExp(r"Dependencies installed!$")); 167 output: new RegExp(r"Dependencies installed!$"));
168 168
169 d.dir(packagesPath, [ 169 d.dir(packagesPath, [
170 d.nothing('foo'), 170 d.nothing('foo'),
171 d.dir('myapp', [d.file('myapp.dart', 'main() => "myapp";')]) 171 d.dir('myapp', [d.file('myapp.dart', 'main() => "myapp";')])
172 ]).validate(); 172 ]).validate();
173 }); 173 });
174 174
175 group('creates a packages directory in', () { 175 group('creates a packages directory in', () {
176 integration('"test/" and its subdirectories', () { 176 for (var dir in ["benchmark", "example", "test", "tool", "web"]) {
177 d.dir(appPath, [ 177 integration('"$dir/" and its subdirectories', () {
178 d.appPubspec([]), 178 d.dir(appPath, [
179 d.libDir('foo'), 179 d.appPubspec([]),
180 d.dir("test", [d.dir("subtest")]) 180 d.libDir('foo'),
181 ]).create(); 181 d.dir(dir, [d.dir("sub${dir}")])
182 ]).create();
182 183
183 schedulePub(args: ['install'], 184 schedulePub(args: ['install'],
184 output: new RegExp(r"Dependencies installed!$")); 185 output: new RegExp(r"Dependencies installed!$"));
185 186
186 d.dir(appPath, [ 187 d.dir(appPath, [
187 d.dir("test", [ 188 d.dir(dir, [
188 d.dir("packages", [
189 d.dir("myapp", [
190 d.file('foo.dart', 'main() => "foo";')
191 ])
192 ]),
193 d.dir("subtest", [
194 d.dir("packages", [ 189 d.dir("packages", [
195 d.dir("myapp", [ 190 d.dir("myapp", [
196 d.file('foo.dart', 'main() => "foo";') 191 d.file('foo.dart', 'main() => "foo";')
197 ]) 192 ])
198 ]) 193 ]),
199 ]) 194 d.dir("sub${dir}", [
200 ]) 195 d.dir("packages", [
201 ]).validate(); 196 d.dir("myapp", [
202 }); 197 d.file('foo.dart', 'main() => "foo";')
203 198 ])
204 integration('"example/" and its subdirectories', () {
205 d.dir(appPath, [
206 d.appPubspec([]),
207 d.libDir('foo'),
208 d.dir("example", [d.dir("subexample")])
209 ]).create();
210
211 schedulePub(args: ['install'],
212 output: new RegExp(r"Dependencies installed!$"));
213
214 d.dir(appPath, [
215 d.dir("example", [
216 d.dir("packages", [
217 d.dir("myapp", [
218 d.file('foo.dart', 'main() => "foo";')
219 ])
220 ]),
221 d.dir("subexample", [
222 d.dir("packages", [
223 d.dir("myapp", [
224 d.file('foo.dart', 'main() => "foo";')
225 ]) 199 ])
226 ]) 200 ])
227 ]) 201 ])
228 ]) 202 ]).validate();
229 ]).validate(); 203 });
230 }); 204 }
231
232 integration('"tool/" and its subdirectories', () {
233 d.dir(appPath, [
234 d.appPubspec([]),
235 d.libDir('foo'),
236 d.dir("tool", [d.dir("subtool")])
237 ]).create();
238
239 schedulePub(args: ['install'],
240 output: new RegExp(r"Dependencies installed!$"));
241
242 d.dir(appPath, [
243 d.dir("tool", [
244 d.dir("packages", [
245 d.dir("myapp", [
246 d.file('foo.dart', 'main() => "foo";')
247 ])
248 ]),
249 d.dir("subtool", [
250 d.dir("packages", [
251 d.dir("myapp", [
252 d.file('foo.dart', 'main() => "foo";')
253 ])
254 ])
255 ])
256 ])
257 ]).validate();
258 });
259
260 integration('"web/" and its subdirectories', () {
261 d.dir(appPath, [
262 d.appPubspec([]),
263 d.libDir('foo'),
264 d.dir("web", [d.dir("subweb")])
265 ]).create();
266
267 schedulePub(args: ['install'],
268 output: new RegExp(r"Dependencies installed!$"));
269
270 d.dir(appPath, [
271 d.dir("web", [
272 d.dir("packages", [
273 d.dir("myapp", [
274 d.file('foo.dart', 'main() => "foo";')
275 ])
276 ]),
277 d.dir("subweb", [
278 d.dir("packages", [
279 d.dir("myapp", [
280 d.file('foo.dart', 'main() => "foo";')
281 ])
282 ])
283 ])
284 ])
285 ]).validate();
286 });
287 205
288 integration('"bin/"', () { 206 integration('"bin/"', () {
289 d.dir(appPath, [ 207 d.dir(appPath, [
290 d.appPubspec([]), 208 d.appPubspec([]),
291 d.libDir('foo'), 209 d.libDir('foo'),
292 d.dir("bin") 210 d.dir("bin")
293 ]).create(); 211 ]).create();
294 212
295 schedulePub(args: ['install'], 213 schedulePub(args: ['install'],
296 output: new RegExp(r"Dependencies installed!$")); 214 output: new RegExp(r"Dependencies installed!$"));
297 215
298 d.dir(appPath, [ 216 d.dir(appPath, [
299 d.dir("bin", [ 217 d.dir("bin", [
300 d.dir("packages", [ 218 d.dir("packages", [
301 d.dir("myapp", [ 219 d.dir("myapp", [
302 d.file('foo.dart', 'main() => "foo";') 220 d.file('foo.dart', 'main() => "foo";')
303 ]) 221 ])
304 ]) 222 ])
305 ]) 223 ])
306 ]).validate(); 224 ]).validate();
307 }); 225 });
308 }); 226 });
309 } 227 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/validator/directory.dart ('k') | sdk/lib/_internal/pub/test/validator/directory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698