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

Unified Diff: utils/pub/pub.dart

Issue 10382137: Refactor the pub tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/unittest/unittest.dart ('k') | utils/tests/pub/pub_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/pub.dart
diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart
index 45c6c9815aad625a4abd0c22919f842aea331d9e..d066a6c12d628613186c80029d1ef4310350d254 100644
--- a/utils/pub/pub.dart
+++ b/utils/pub/pub.dart
@@ -35,6 +35,22 @@ main() {
'version': new VersionCommand()
};
+ // TODO(rnystrom): Hack. This is temporary code to allow the pub tests to
+ // pass in relevant paths. Eventually these should be either environment
+ // variables or at least a cleaner arg parser.
+ var cacheDir, sdkDir;
+ for (var i = 0; i < args.length; i++) {
+ if (args[i].startsWith('--cachedir=')) {
+ cacheDir = args[i].substring('--cachedir='.length);
+ args.removeRange(i, 1);
+ i--;
+ } else if (args[i].startsWith('--sdkdir=')) {
+ sdkDir = args[i].substring('--sdkdir='.length);
+ args.removeRange(i, 1);
+ i--;
+ }
+ }
+
if (args.length == 0) {
printUsage(commands);
return;
@@ -54,22 +70,6 @@ main() {
}
}
- // TODO(rnystrom): Hack. This is temporary code to allow the pub tests to
- // pass in relevant paths. Eventually these should be either environment
- // variables or at least a cleaner arg parser.
- var cacheDir, sdkDir;
- for (var i = 0; i < args.length; i++) {
- if (args[i].startsWith('--cachedir=')) {
- cacheDir = args[i].substring('--cachedir='.length);
- args.removeRange(i, 1);
- i--;
- } else if (args[i].startsWith('--sdkdir=')) {
- sdkDir = args[i].substring('--sdkdir='.length);
- args.removeRange(i, 1);
- i--;
- }
- }
-
// TODO(rnystrom): Do we want this to be global?
final cache = new SystemCache(cacheDir);
« no previous file with comments | « lib/unittest/unittest.dart ('k') | utils/tests/pub/pub_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698