Index: sdk/lib/_internal/pub_generated/test/get/hosted/cached_pubspec_test.dart |
diff --git a/sdk/lib/_internal/pub_generated/test/get/hosted/cached_pubspec_test.dart b/sdk/lib/_internal/pub_generated/test/get/hosted/cached_pubspec_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..82703f0a126caebd86f69d41cc24ed8d2a1b7dcb |
--- /dev/null |
+++ b/sdk/lib/_internal/pub_generated/test/get/hosted/cached_pubspec_test.dart |
@@ -0,0 +1,25 @@ |
+library pub_tests; |
+import 'package:scheduled_test/scheduled_test.dart'; |
+import '../../descriptor.dart' as d; |
+import '../../test_pub.dart'; |
+main() { |
+ initConfig(); |
+ integration('does not request a pubspec for a cached package', () { |
+ servePackages((builder) => builder.serve("foo", "1.2.3")); |
+ d.appDir({ |
+ "foo": "1.2.3" |
+ }).create(); |
+ pubGet(); |
+ getRequestedPaths(); |
+ d.cacheDir({ |
+ "foo": "1.2.3" |
+ }).validate(); |
+ d.packagesDir({ |
+ "foo": "1.2.3" |
+ }).validate(); |
+ pubGet(); |
+ getRequestedPaths().then((paths) { |
+ expect(paths, isNot(contains("packages/foo/versions/1.2.3.yaml"))); |
+ }); |
+ }); |
+} |