| 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 'test_pub.dart'; | 9 import 'test_pub.dart'; |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |