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

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

Issue 10947050: Support dependencies in SDK packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to review. Created 8 years, 3 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_test.dart ('k') | no next file » | 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 /** 5 /**
6 * Test infrastructure for testing pub. Unlike typical unit tests, most pub 6 * Test infrastructure for testing pub. Unlike typical unit tests, most pub
7 * tests are integration tests that stage some stuff on the file system, run 7 * tests are integration tests that stage some stuff on the file system, run
8 * pub, and then validate the results. This library provides an API to build 8 * pub, and then validate the results. This library provides an API to build
9 * tests like that. 9 * tests like that.
10 */ 10 */
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 /// Return the name for the package described by [description] and from 406 /// Return the name for the package described by [description] and from
407 /// [sourceName]. 407 /// [sourceName].
408 String _packageName(String sourceName, description) { 408 String _packageName(String sourceName, description) {
409 switch (sourceName) { 409 switch (sourceName) {
410 case "git": 410 case "git":
411 var url = description is String ? description : description['url']; 411 var url = description is String ? description : description['url'];
412 return basename(url.replaceFirst(const RegExp(@"(\.git)?/?$"), "")); 412 return basename(url.replaceFirst(const RegExp(@"(\.git)?/?$"), ""));
413 case "hosted": 413 case "hosted":
414 if (description is String) return description; 414 if (description is String) return description;
415 return description['name']; 415 return description['name'];
416 case "sdk":
417 return description;
416 default: 418 default:
417 return description; 419 return description;
418 } 420 }
419 } 421 }
420 422
421 /** 423 /**
422 * The path of the package cache directory used for tests. Relative to the 424 * The path of the package cache directory used for tests. Relative to the
423 * sandbox directory. 425 * sandbox directory.
424 */ 426 */
425 final String cachePath = "cache"; 427 final String cachePath = "cache";
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 } 1158 }
1157 1159
1158 /** 1160 /**
1159 * Schedules a callback to be called after Pub is run with [runPub], even if it 1161 * Schedules a callback to be called after Pub is run with [runPub], even if it
1160 * fails. 1162 * fails.
1161 */ 1163 */
1162 void _scheduleCleanup(_ScheduledEvent event) { 1164 void _scheduleCleanup(_ScheduledEvent event) {
1163 if (_scheduledCleanup == null) _scheduledCleanup = []; 1165 if (_scheduledCleanup == null) _scheduledCleanup = [];
1164 _scheduledCleanup.add(event); 1166 _scheduledCleanup.add(event);
1165 } 1167 }
OLDNEW
« no previous file with comments | « utils/tests/pub/pub_update_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698