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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 schedulePub(args: ['help', 'quylthulg'], | 116 schedulePub(args: ['help', 'quylthulg'], |
117 error: ''' | 117 error: ''' |
118 Could not find a command named "quylthulg". | 118 Could not find a command named "quylthulg". |
119 Run "pub help" to see available commands. | 119 Run "pub help" to see available commands. |
120 ''', | 120 ''', |
121 exitCode: 64); | 121 exitCode: 64); |
122 }); | 122 }); |
123 | 123 |
124 }); | 124 }); |
125 | 125 |
126 integration('displays the current version', () { | 126 group('version', () { |
127 dir(sdkPath, [ | 127 integration('displays the current version', () { |
128 file('version', '0.1.2.3'), | 128 dir(sdkPath, [ |
129 ]).scheduleCreate(); | 129 file('version', '0.1.2.3'), |
| 130 ]).scheduleCreate(); |
130 | 131 |
131 schedulePub(args: ['version'], output: VERSION_STRING); | 132 schedulePub(args: ['version'], output: VERSION_STRING); |
| 133 }); |
| 134 |
| 135 integration('parses a release-style version', () { |
| 136 dir(sdkPath, [ |
| 137 file('version', '0.1.2.0_r17645'), |
| 138 ]).scheduleCreate(); |
| 139 |
| 140 schedulePub(args: ['version'], output: "Pub 0.1.2+0.r17645\n"); |
| 141 }); |
| 142 |
| 143 integration('parses a dev-only style version', () { |
| 144 // The "version" file generated on developer builds is a little funky and |
| 145 // we need to make sure we don't choke on it. |
| 146 dir(sdkPath, [ |
| 147 file('version', '0.1.2.0_r16279_bobross'), |
| 148 ]).scheduleCreate(); |
| 149 |
| 150 schedulePub(args: ['version'], output: "Pub 0.1.2+0.r16279.bobross\n"); |
| 151 }); |
132 }); | 152 }); |
133 } | 153 } |
OLD | NEW |