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 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import 'test_pub.dart'; | 9 import 'test_pub.dart'; |
10 import '../../../pkg/unittest/lib/unittest.dart'; | 10 import '../../../pkg/unittest/lib/unittest.dart'; |
(...skipping 24 matching lines...) Expand all Loading... |
35 version Print pub version. | 35 version Print pub version. |
36 | 36 |
37 Use "pub help [command]" for more information about a command. | 37 Use "pub help [command]" for more information about a command. |
38 """; | 38 """; |
39 | 39 |
40 final VERSION_STRING = ''' | 40 final VERSION_STRING = ''' |
41 Pub 0.1.2+3 | 41 Pub 0.1.2+3 |
42 '''; | 42 '''; |
43 | 43 |
44 main() { | 44 main() { |
| 45 initConfig(); |
| 46 |
45 integration('running pub with no command displays usage', () { | 47 integration('running pub with no command displays usage', () { |
46 schedulePub(args: [], output: USAGE_STRING); | 48 schedulePub(args: [], output: USAGE_STRING); |
47 }); | 49 }); |
48 | 50 |
49 integration('running pub with just --help displays usage', () { | 51 integration('running pub with just --help displays usage', () { |
50 schedulePub(args: ['--help'], output: USAGE_STRING); | 52 schedulePub(args: ['--help'], output: USAGE_STRING); |
51 }); | 53 }); |
52 | 54 |
53 integration('running pub with just -h displays usage', () { | 55 integration('running pub with just -h displays usage', () { |
54 schedulePub(args: ['-h'], output: USAGE_STRING); | 56 schedulePub(args: ['-h'], output: USAGE_STRING); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // The "version" file generated on developer builds is a little funky and | 138 // The "version" file generated on developer builds is a little funky and |
137 // we need to make sure we don't choke on it. | 139 // we need to make sure we don't choke on it. |
138 dir(sdkPath, [ | 140 dir(sdkPath, [ |
139 file('version', '0.1.2.0_r16279_bobross'), | 141 file('version', '0.1.2.0_r16279_bobross'), |
140 ]).scheduleCreate(); | 142 ]).scheduleCreate(); |
141 | 143 |
142 schedulePub(args: ['version'], output: "Pub 0.1.2+0.r16279.bobross\n"); | 144 schedulePub(args: ['version'], output: "Pub 0.1.2+0.r16279.bobross\n"); |
143 }); | 145 }); |
144 }); | 146 }); |
145 } | 147 } |
OLD | NEW |