Index: sdk/lib/_internal/pub/test/validator/pubspec_field_test.dart |
diff --git a/sdk/lib/_internal/pub/test/validator/pubspec_field_test.dart b/sdk/lib/_internal/pub/test/validator/pubspec_field_test.dart |
index 15ed04e2ecd7715ba8fd761cbf3cc069d7ca4201..91cd78492d6f794d2cc26ba712ca3e184f914e74 100644 |
--- a/sdk/lib/_internal/pub/test/validator/pubspec_field_test.dart |
+++ b/sdk/lib/_internal/pub/test/validator/pubspec_field_test.dart |
@@ -28,6 +28,22 @@ main() { |
d.dir(appPath, [d.pubspec(pkg)]).create(); |
expectNoValidationError(pubspecField); |
}); |
+ |
+ integration('has an HTTPS homepage URL', () { |
+ var pkg = packageMap("test_pkg", "1.0.0"); |
+ pkg["homepage"] = "https://pub.dartlang.org"; |
+ d.dir(appPath, [d.pubspec(pkg)]).create(); |
+ |
+ expectNoValidationError(pubspecField); |
+ }); |
+ |
+ integration('has an HTTPS documentation URL', () { |
+ var pkg = packageMap("test_pkg", "1.0.0"); |
+ pkg["documentation"] = "https://pub.dartlang.org"; |
+ d.dir(appPath, [d.pubspec(pkg)]).create(); |
+ |
+ expectNoValidationError(pubspecField); |
+ }); |
}); |
group('should consider a package invalid if it', () { |
@@ -98,5 +114,21 @@ main() { |
expectValidationWarning(pubspecField); |
}); |
+ |
+ integration('has a non-HTTP homepage URL', () { |
+ var pkg = packageMap("test_pkg", "1.0.0"); |
+ pkg["homepage"] = "file:///foo/bar"; |
+ d.dir(appPath, [d.pubspec(pkg)]).create(); |
+ |
+ expectValidationError(pubspecField); |
+ }); |
+ |
+ integration('has a non-HTTP documentation URL', () { |
+ var pkg = packageMap("test_pkg", "1.0.0"); |
+ pkg["documentation"] = "file:///foo/bar"; |
+ d.dir(appPath, [d.pubspec(pkg)]).create(); |
+ |
+ expectValidationError(pubspecField); |
+ }); |
}); |
} |