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

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

Issue 363573002: Add a line to pub usage output explaining how to see global options. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 5 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) 2013, the Dart project authors. Please see the AUTHORS file 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 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_uploader_test; 5 library pub_uploader_test;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:scheduled_test/scheduled_process.dart'; 10 import 'package:scheduled_test/scheduled_process.dart';
(...skipping 11 matching lines...) Expand all
22 Manage uploaders for a package on pub.dartlang.org. 22 Manage uploaders for a package on pub.dartlang.org.
23 23
24 Usage: pub uploader [options] {add/remove} <email> 24 Usage: pub uploader [options] {add/remove} <email>
25 -h, --help Print usage information for this command. 25 -h, --help Print usage information for this command.
26 --server The package server on which the package is hosted. 26 --server The package server on which the package is hosted.
27 (defaults to "https://pub.dartlang.org") 27 (defaults to "https://pub.dartlang.org")
28 28
29 --package The package whose uploaders will be modified. 29 --package The package whose uploaders will be modified.
30 (defaults to the current package) 30 (defaults to the current package)
31 31
32 Run "pub help" to see global options.
32 See http://dartlang.org/tools/pub/cmd/pub-uploader.html for detailed documentati on. 33 See http://dartlang.org/tools/pub/cmd/pub-uploader.html for detailed documentati on.
33 '''; 34 ''';
34 35
35 ScheduledProcess startPubUploader(ScheduledServer server, List<String> args) { 36 ScheduledProcess startPubUploader(ScheduledServer server, List<String> args) {
36 var tokenEndpoint = server.url.then((url) => 37 var tokenEndpoint = server.url.then((url) =>
37 url.resolve('/token').toString()); 38 url.resolve('/token').toString());
38 args = flatten(['uploader', '--server', tokenEndpoint, args]); 39 args = flatten(['uploader', '--server', tokenEndpoint, args]);
39 return startPub(args: args, tokenEndpoint: tokenEndpoint); 40 return startPub(args: args, tokenEndpoint: tokenEndpoint);
40 } 41 }
41 42
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 163
163 server.handle('DELETE', '/api/packages/pkg/uploaders/email', 164 server.handle('DELETE', '/api/packages/pkg/uploaders/email',
164 (request) => new shelf.Response.ok("{not json")); 165 (request) => new shelf.Response.ok("{not json"));
165 166
166 pub.stderr.expect(emitsLines( 167 pub.stderr.expect(emitsLines(
167 'Invalid server response:\n' 168 'Invalid server response:\n'
168 '{not json')); 169 '{not json'));
169 pub.shouldExit(1); 170 pub.shouldExit(1);
170 }); 171 });
171 } 172 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/test/pub_test.dart ('k') | sdk/lib/_internal/pub/test/run/errors_if_no_executable_is_given_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698