| OLD | NEW |
| 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 '../lib/src/exit_codes.dart' as exit_codes; | 9 import '../lib/src/exit_codes.dart' as exit_codes; |
| 10 import 'test_pub.dart'; | 10 import 'test_pub.dart'; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 Usage: pub publish [options] | 203 Usage: pub publish [options] |
| 204 -h, --help Print usage information for this command. | 204 -h, --help Print usage information for this command. |
| 205 -n, --dry-run Validate but do not publish the package. | 205 -n, --dry-run Validate but do not publish the package. |
| 206 -f, --force Publish without confirmation if there are no errors
. | 206 -f, --force Publish without confirmation if there are no errors
. |
| 207 --server The package server to which to upload this package. | 207 --server The package server to which to upload this package. |
| 208 (defaults to "https://pub.dartlang.org") | 208 (defaults to "https://pub.dartlang.org") |
| 209 '''); | 209 '''); |
| 210 }); | 210 }); |
| 211 | 211 |
| 212 integration('shows non-truncated help', () { |
| 213 schedulePub(args: ['help', 'serve'], |
| 214 output: ''' |
| 215 Run a local web development server. |
| 216 |
| 217 By default, this serves "web/" and "test/", but an explicit list of |
| 218 directories to serve can be provided as well. |
| 219 |
| 220 Usage: pub serve [directories...] |
| 221 -h, --help Print usage information for this command. |
| 222 --port The base port to listen on. |
| 223 (defaults to "8080") |
| 224 |
| 225 --[no-]dart2js Compile Dart to JavaScript. |
| 226 (defaults to on) |
| 227 |
| 228 --[no-]force-poll Force the use of a polling filesystem watch
er. |
| 229 --mode Mode to run transformers in. |
| 230 (defaults to "debug") |
| 231 '''); |
| 232 }); |
| 233 |
| 212 integration('shows help for a subcommand', () { | 234 integration('shows help for a subcommand', () { |
| 213 schedulePub(args: ['help', 'cache', 'list'], | 235 schedulePub(args: ['help', 'cache', 'list'], |
| 214 output: ''' | 236 output: ''' |
| 215 List packages in the system cache. | 237 List packages in the system cache. |
| 216 | 238 |
| 217 Usage: pub cache list | 239 Usage: pub cache list |
| 218 -h, --help Print usage information for this command. | 240 -h, --help Print usage information for this command. |
| 219 '''); | 241 '''); |
| 220 }); | 242 }); |
| 221 | 243 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 exitCode: exit_codes.USAGE); | 285 exitCode: exit_codes.USAGE); |
| 264 }); | 286 }); |
| 265 }); | 287 }); |
| 266 | 288 |
| 267 group('version', () { | 289 group('version', () { |
| 268 integration('displays the current version', () { | 290 integration('displays the current version', () { |
| 269 schedulePub(args: ['version'], output: VERSION_STRING); | 291 schedulePub(args: ['version'], output: VERSION_STRING); |
| 270 }); | 292 }); |
| 271 }); | 293 }); |
| 272 } | 294 } |
| OLD | NEW |