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

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

Issue 122483003: Make "pub help" show global help. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 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 'package:scheduled_test/scheduled_test.dart'; 7 import 'package:scheduled_test/scheduled_test.dart';
8 8
9 import 'test_pub.dart'; 9 import 'test_pub.dart';
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 Usage: pub version 121 Usage: pub version
122 -h, --help Print usage information for this command. 122 -h, --help Print usage information for this command.
123 ''', 123 ''',
124 error: ''' 124 error: '''
125 Command "version" does not take any arguments. 125 Command "version" does not take any arguments.
126 ''', 126 ''',
127 exitCode: 64); 127 exitCode: 64);
128 }); 128 });
129 129
130 group('help', () { 130 group('help', () {
131 integration('shows global help if no command is given', () {
132 schedulePub(args: ['help'], output: USAGE_STRING);
133 });
134
131 integration('shows help for a command', () { 135 integration('shows help for a command', () {
132 schedulePub(args: ['help', 'get'], 136 schedulePub(args: ['help', 'get'],
133 output: ''' 137 output: '''
134 Get the current package's dependencies. 138 Get the current package's dependencies.
135 139
136 Usage: pub get 140 Usage: pub get
137 -h, --help Print usage information for this command. 141 -h, --help Print usage information for this command.
138 --[no-]offline Use cached packages instead of accessing the n etwork. 142 --[no-]offline Use cached packages instead of accessing the n etwork.
139 '''); 143 ''');
140 }); 144 });
(...skipping 22 matching lines...) Expand all
163 }); 167 });
164 168
165 }); 169 });
166 170
167 group('version', () { 171 group('version', () {
168 integration('displays the current version', () { 172 integration('displays the current version', () {
169 schedulePub(args: ['version'], output: VERSION_STRING); 173 schedulePub(args: ['version'], output: VERSION_STRING);
170 }); 174 });
171 }); 175 });
172 } 176 }
OLDNEW
« sdk/lib/_internal/pub/lib/src/command.dart ('K') | « sdk/lib/_internal/pub/lib/src/command/help.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698