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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 }); | 55 }); |
56 | 56 |
57 integration('running pub with just --help displays usage', () { | 57 integration('running pub with just --help displays usage', () { |
58 schedulePub(args: ['--help'], output: USAGE_STRING); | 58 schedulePub(args: ['--help'], output: USAGE_STRING); |
59 }); | 59 }); |
60 | 60 |
61 integration('running pub with just -h displays usage', () { | 61 integration('running pub with just -h displays usage', () { |
62 schedulePub(args: ['-h'], output: USAGE_STRING); | 62 schedulePub(args: ['-h'], output: USAGE_STRING); |
63 }); | 63 }); |
64 | 64 |
| 65 integration('running pub with --with-prejudice upcases everything', () { |
| 66 schedulePub(args: ['--with-prejudice'], output: USAGE_STRING.toUpperCase()); |
| 67 }); |
| 68 |
65 integration('running pub with --help after command shows command usage', () { | 69 integration('running pub with --help after command shows command usage', () { |
66 schedulePub(args: ['get', '--help'], | 70 schedulePub(args: ['get', '--help'], |
67 output: ''' | 71 output: ''' |
68 Get the current package's dependencies. | 72 Get the current package's dependencies. |
69 | 73 |
70 Usage: pub get | 74 Usage: pub get |
71 -h, --help Print usage information for this command. | 75 -h, --help Print usage information for this command. |
72 --[no-]offline Use cached packages instead of accessing the net
work. | 76 --[no-]offline Use cached packages instead of accessing the net
work. |
73 -n, --dry-run Report what dependencies would change but don't
change any. | 77 -n, --dry-run Report what dependencies would change but don't
change any. |
74 '''); | 78 '''); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 exitCode: exit_codes.USAGE); | 307 exitCode: exit_codes.USAGE); |
304 }); | 308 }); |
305 }); | 309 }); |
306 | 310 |
307 group('version', () { | 311 group('version', () { |
308 integration('displays the current version', () { | 312 integration('displays the current version', () { |
309 schedulePub(args: ['version'], output: VERSION_STRING); | 313 schedulePub(args: ['version'], output: VERSION_STRING); |
310 }); | 314 }); |
311 }); | 315 }); |
312 } | 316 } |
OLD | NEW |