Index: sdk/lib/_internal/pub/test/pubspec_test.dart |
diff --git a/sdk/lib/_internal/pub/test/pubspec_test.dart b/sdk/lib/_internal/pub/test/pubspec_test.dart |
index 67f927662497d1cd6b022ef68835ed4e39c867e7..542961df9e28dd79bcd977abd6e9978819652e35 100644 |
--- a/sdk/lib/_internal/pub/test/pubspec_test.dart |
+++ b/sdk/lib/_internal/pub/test/pubspec_test.dart |
@@ -231,7 +231,23 @@ dependencies: |
}); |
test("throws if version is not a string", () { |
- expectPubspecException('version: 1.0', (pubspec) => pubspec.version); |
+ expectPubspecException('version: [2, 0, 0]', |
+ (pubspec) => pubspec.version, |
+ '"version" field must be a string'); |
+ }); |
+ |
+ test("throws if version is malformed (looking like a double)", () { |
+ expectPubspecException('version: 2.1', |
+ (pubspec) => pubspec.version, |
+ '"version" field must have three numeric components: major, minor, ' |
+ 'and patch. Instead of "2.1", consider "2.1.0"'); |
+ }); |
+ |
+ test("throws if version is malformed (looking like an int)", () { |
+ expectPubspecException('version: 2', |
+ (pubspec) => pubspec.version, |
+ '"version" field must have three numeric components: major, minor, ' |
+ 'and patch. Instead of "2", consider "2.0.0"'); |
}); |
test("throws if version is not a version", () { |