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:pub/src/exit_codes.dart' as exit_codes; | 7 import 'package:pub/src/exit_codes.dart' as exit_codes; |
8 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
9 | 9 |
10 import 'test_pub.dart'; | 10 import 'test_pub.dart'; |
11 | 11 |
12 main() { | 12 main() { |
13 integration('running pub with no command displays usage', () { | 13 integration('running pub with no command displays usage', () { |
14 schedulePub(args: [], output: """ | 14 schedulePub(args: [], output: """ |
15 Pub is a package manager for Dart. | 15 Pub is a package manager for Dart. |
16 | 16 |
17 Usage: pub <command> [arguments] | 17 Usage: pub <command> [arguments] |
18 | 18 |
19 Global options: | 19 Global options: |
20 -h, --help Print this usage information. | 20 -h, --help Print this usage information. |
21 --version Print pub version. | 21 --version Print pub version. |
22 --[no-]trace Print debugging information when an error
occurs. | 22 --[no-]trace Print debugging information when an error occurs. |
23 --verbosity Control output verbosity. | 23 --verbosity Control output verbosity. |
24 | 24 |
25 [all] Show all output including internal tracin
g messages. | 25 [all] Show all output including internal tracing messag
es. |
26 [error] Show only errors. | 26 [error] Show only errors. |
27 [io] Also show IO operations. | 27 [io] Also show IO operations. |
28 [normal] Show errors, warnings, and user messages. | 28 [normal] Show errors, warnings, and user messages. |
29 [solver] Show steps during version resolution. | 29 [solver] Show steps during version resolution. |
30 [warning] Show only errors and warnings. | 30 [warning] Show only errors and warnings. |
31 | 31 |
32 -v, --verbose Shortcut for "--verbosity=all". | 32 -v, --verbose Shortcut for "--verbosity=all". |
33 --[no-]package-symlinks Generate packages/ directories when insta
lling packages. | |
34 (defaults to on) | |
35 | 33 |
36 Available commands: | 34 Available commands: |
37 build Apply transformers to build a package. | 35 build Apply transformers to build a package. |
38 cache Work with the system cache. | 36 cache Work with the system cache. |
39 deps Print package dependencies. | 37 deps Print package dependencies. |
40 downgrade Downgrade the current package's dependencies to oldest ver
sions. | 38 downgrade Downgrade the current package's dependencies to oldest ver
sions. |
41 get Get the current package's dependencies. | 39 get Get the current package's dependencies. |
42 global Work with global packages. | 40 global Work with global packages. |
43 help Display help information for pub. | 41 help Display help information for pub. |
44 publish Publish the current package to pub.dartlang.org. | 42 publish Publish the current package to pub.dartlang.org. |
45 run Run an executable from a package. | 43 run Run an executable from a package. |
46 serve Run a local web development server. | 44 serve Run a local web development server. |
47 upgrade Upgrade the current package's dependencies to latest versi
ons. | 45 upgrade Upgrade the current package's dependencies to latest versi
ons. |
48 uploader Manage uploaders for a package on pub.dartlang.org. | 46 uploader Manage uploaders for a package on pub.dartlang.org. |
49 version Print pub version. | 47 version Print pub version. |
50 | 48 |
51 Run "pub help <command>" for more information about a command. | 49 Run "pub help <command>" for more information about a command. |
52 See http://dartlang.org/tools/pub for detailed documentation. | 50 See http://dartlang.org/tools/pub for detailed documentation. |
53 """); | 51 """); |
54 }); | 52 }); |
55 | 53 |
56 integration('running pub with just --version displays version', () { | 54 integration('running pub with just --version displays version', () { |
57 schedulePub(args: ['--version'], output: 'Pub 0.1.2+3'); | 55 schedulePub(args: ['--version'], output: 'Pub 0.1.2+3'); |
58 }); | 56 }); |
59 } | 57 } |
OLD | NEW |