Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: utils/tests/pub/pub_test.dart

Issue 12087008: Handle parsing the "version" file better. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/tests/pub/command_line_config.dart ('k') | utils/tests/pub/real_version_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « utils/tests/pub/command_line_config.dart ('k') | utils/tests/pub/real_version_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698