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 16 matching lines...) Expand all Loading... |
27 | 27 |
28 -v, --verbose Shortcut for "--verbosity=all". | 28 -v, --verbose Shortcut for "--verbosity=all". |
29 | 29 |
30 Available commands: | 30 Available commands: |
31 build Apply transformers to build a package. | 31 build Apply transformers to build a package. |
32 cache Work with the system cache. | 32 cache Work with the system cache. |
33 deps Print package dependencies. | 33 deps Print package dependencies. |
34 get Get the current package's dependencies. | 34 get Get the current package's dependencies. |
35 help Display help information for Pub. | 35 help Display help information for Pub. |
36 publish Publish the current package to pub.dartlang.org. | 36 publish Publish the current package to pub.dartlang.org. |
| 37 run Run an executable from a package. |
37 serve Run a local web development server. | 38 serve Run a local web development server. |
38 upgrade Upgrade the current package's dependencies to latest versions. | 39 upgrade Upgrade the current package's dependencies to latest versions. |
39 uploader Manage uploaders for a package on pub.dartlang.org. | 40 uploader Manage uploaders for a package on pub.dartlang.org. |
40 version Print pub version. | 41 version Print pub version. |
41 | 42 |
42 Use "pub help [command]" for more information about a command. | 43 Use "pub help [command]" for more information about a command. |
43 """; | 44 """; |
44 | 45 |
45 final VERSION_STRING = ''' | 46 final VERSION_STRING = ''' |
46 Pub 0.1.2+3 | 47 Pub 0.1.2+3 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 error: ''' | 109 error: ''' |
109 Could not find a command named "quylthulg". | 110 Could not find a command named "quylthulg". |
110 | 111 |
111 Available commands: | 112 Available commands: |
112 build Apply transformers to build a package. | 113 build Apply transformers to build a package. |
113 cache Work with the system cache. | 114 cache Work with the system cache. |
114 deps Print package dependencies. | 115 deps Print package dependencies. |
115 get Get the current package's dependencies. | 116 get Get the current package's dependencies. |
116 help Display help information for Pub. | 117 help Display help information for Pub. |
117 publish Publish the current package to pub.dartlang.org. | 118 publish Publish the current package to pub.dartlang.org. |
| 119 run Run an executable from a package. |
118 serve Run a local web development server. | 120 serve Run a local web development server. |
119 upgrade Upgrade the current package's dependencies to latest versio
ns. | 121 upgrade Upgrade the current package's dependencies to latest versio
ns. |
120 uploader Manage uploaders for a package on pub.dartlang.org. | 122 uploader Manage uploaders for a package on pub.dartlang.org. |
121 version Print pub version. | 123 version Print pub version. |
122 ''', | 124 ''', |
123 exitCode: exit_codes.USAGE); | 125 exitCode: exit_codes.USAGE); |
124 }); | 126 }); |
125 | 127 |
126 integration('an unknown subcommand displays an error message', () { | 128 integration('an unknown subcommand displays an error message', () { |
127 schedulePub(args: ['cache', 'quylthulg'], | 129 schedulePub(args: ['cache', 'quylthulg'], |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 error: ''' | 258 error: ''' |
257 Could not find a command named "quylthulg". | 259 Could not find a command named "quylthulg". |
258 | 260 |
259 Available commands: | 261 Available commands: |
260 build Apply transformers to build a package. | 262 build Apply transformers to build a package. |
261 cache Work with the system cache. | 263 cache Work with the system cache. |
262 deps Print package dependencies. | 264 deps Print package dependencies. |
263 get Get the current package's dependencies. | 265 get Get the current package's dependencies. |
264 help Display help information for Pub. | 266 help Display help information for Pub. |
265 publish Publish the current package to pub.dartlang.org. | 267 publish Publish the current package to pub.dartlang.org. |
| 268 run Run an executable from a package. |
266 serve Run a local web development server. | 269 serve Run a local web development server. |
267 upgrade Upgrade the current package's dependencies to latest ve
rsions. | 270 upgrade Upgrade the current package's dependencies to latest ve
rsions. |
268 uploader Manage uploaders for a package on pub.dartlang.org. | 271 uploader Manage uploaders for a package on pub.dartlang.org. |
269 version Print pub version. | 272 version Print pub version. |
270 ''', | 273 ''', |
271 exitCode: exit_codes.USAGE); | 274 exitCode: exit_codes.USAGE); |
272 }); | 275 }); |
273 | 276 |
274 integration('an unknown help subcommand displays an error message', () { | 277 integration('an unknown help subcommand displays an error message', () { |
275 schedulePub(args: ['help', 'cache', 'quylthulg'], | 278 schedulePub(args: ['help', 'cache', 'quylthulg'], |
(...skipping 21 matching lines...) Expand all Loading... |
297 exitCode: exit_codes.USAGE); | 300 exitCode: exit_codes.USAGE); |
298 }); | 301 }); |
299 }); | 302 }); |
300 | 303 |
301 group('version', () { | 304 group('version', () { |
302 integration('displays the current version', () { | 305 integration('displays the current version', () { |
303 schedulePub(args: ['version'], output: VERSION_STRING); | 306 schedulePub(args: ['version'], output: VERSION_STRING); |
304 }); | 307 }); |
305 }); | 308 }); |
306 } | 309 } |
OLD | NEW |