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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/pub_test.dart
diff --git a/utils/tests/pub/pub_test.dart b/utils/tests/pub/pub_test.dart
index 13426f191b5e1df54db768797a66e83d7a5303eb..6de4dbcc6c766c46a686b1a34f537d582a291d6f 100644
--- a/utils/tests/pub/pub_test.dart
+++ b/utils/tests/pub/pub_test.dart
@@ -123,11 +123,31 @@ main() {
});
- integration('displays the current version', () {
- dir(sdkPath, [
- file('version', '0.1.2.3'),
- ]).scheduleCreate();
+ group('version', () {
+ integration('displays the current version', () {
+ dir(sdkPath, [
+ file('version', '0.1.2.3'),
+ ]).scheduleCreate();
+
+ schedulePub(args: ['version'], output: VERSION_STRING);
+ });
- schedulePub(args: ['version'], output: VERSION_STRING);
+ integration('parses a release-style version', () {
+ dir(sdkPath, [
+ file('version', '0.1.2.0_r17645'),
+ ]).scheduleCreate();
+
+ schedulePub(args: ['version'], output: "Pub 0.1.2+0.r17645\n");
+ });
+
+ integration('parses a dev-only style version', () {
+ // The "version" file generated on developer builds is a little funky and
+ // we need to make sure we don't choke on it.
+ dir(sdkPath, [
+ file('version', '0.1.2.0_r16279_bobross'),
+ ]).scheduleCreate();
+
+ schedulePub(args: ['version'], output: "Pub 0.1.2+0.r16279.bobross\n");
+ });
});
}
« 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