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

Unified Diff: test/hosted/offline_test.dart

Issue 1971523002: Fix --offline with prerelease versions. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 4 years, 7 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 | « lib/src/source/hosted.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/hosted/offline_test.dart
diff --git a/test/hosted/offline_test.dart b/test/hosted/offline_test.dart
index 1384517e1ebaf63763e1bac1718f3ad7a58535f5..4be597a79068eccc3c22c547011cb92e493b9ec5 100644
--- a/test/hosted/offline_test.dart
+++ b/test/hosted/offline_test.dart
@@ -37,6 +37,31 @@ main() {
}).validate();
});
+ integration('supports prerelease versions', () {
+ // Run the server so that we know what URL to use in the system cache.
+ serveErrors();
+
+ d.cacheDir({
+ "foo": ["1.2.3-alpha.1"]
+ }, includePubspecs: true).create();
+
+ d.appDir({
+ "foo": "any"
+ }).create();
+
+ var warning = null;
+ if (command == RunCommand.upgrade) {
+ warning = "Warning: Upgrading when offline may not update you "
+ "to the latest versions of your dependencies.";
+ }
+
+ pubCommand(command, args: ['--offline'], warning: warning);
+
+ d.packagesDir({
+ "foo": "1.2.3-alpha.1"
+ }).validate();
+ });
+
integration('fails gracefully if a dependency is not cached', () {
// Run the server so that we know what URL to use in the system cache.
serveErrors();
« no previous file with comments | « lib/src/source/hosted.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698