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

Side by Side Diff: test/hosted/offline_test.dart

Issue 2377063002: Make "--no-packages-dir" the default. (Closed)
Patch Set: Revise again. Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « test/get/switch_source_test.dart ('k') | test/hosted/remove_removed_dependency_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:pub/src/exit_codes.dart' as exit_codes; 5 import 'package:pub/src/exit_codes.dart' as exit_codes;
6 6
7 import '../descriptor.dart' as d; 7 import '../descriptor.dart' as d;
8 import '../test_pub.dart'; 8 import '../test_pub.dart';
9 9
10 main() { 10 main() {
(...skipping 13 matching lines...) Expand all
24 }).create(); 24 }).create();
25 25
26 var warning = null; 26 var warning = null;
27 if (command == RunCommand.upgrade) { 27 if (command == RunCommand.upgrade) {
28 warning = "Warning: Upgrading when offline may not update you " 28 warning = "Warning: Upgrading when offline may not update you "
29 "to the latest versions of your dependencies."; 29 "to the latest versions of your dependencies.";
30 } 30 }
31 31
32 pubCommand(command, args: ['--offline'], warning: warning); 32 pubCommand(command, args: ['--offline'], warning: warning);
33 33
34 d.packagesDir({ 34 d.appPackagesFile({
35 "foo": "1.2.3", 35 "foo": "1.2.3",
36 "bar": "1.2.3" 36 "bar": "1.2.3"
37 }).validate(); 37 }).validate();
38 }); 38 });
39 39
40 integration('supports prerelease versions', () { 40 integration('supports prerelease versions', () {
41 // Run the server so that we know what URL to use in the system cache. 41 // Run the server so that we know what URL to use in the system cache.
42 serveErrors(); 42 serveErrors();
43 43
44 d.cacheDir({ 44 d.cacheDir({
45 "foo": ["1.2.3-alpha.1"] 45 "foo": ["1.2.3-alpha.1"]
46 }, includePubspecs: true).create(); 46 }, includePubspecs: true).create();
47 47
48 d.appDir({ 48 d.appDir({
49 "foo": "any" 49 "foo": "any"
50 }).create(); 50 }).create();
51 51
52 var warning = null; 52 var warning = null;
53 if (command == RunCommand.upgrade) { 53 if (command == RunCommand.upgrade) {
54 warning = "Warning: Upgrading when offline may not update you " 54 warning = "Warning: Upgrading when offline may not update you "
55 "to the latest versions of your dependencies."; 55 "to the latest versions of your dependencies.";
56 } 56 }
57 57
58 pubCommand(command, args: ['--offline'], warning: warning); 58 pubCommand(command, args: ['--offline'], warning: warning);
59 59
60 d.packagesDir({ 60 d.appPackagesFile({
61 "foo": "1.2.3-alpha.1" 61 "foo": "1.2.3-alpha.1"
62 }).validate(); 62 }).validate();
63 }); 63 });
64 64
65 integration('fails gracefully if a dependency is not cached', () { 65 integration('fails gracefully if a dependency is not cached', () {
66 // Run the server so that we know what URL to use in the system cache. 66 // Run the server so that we know what URL to use in the system cache.
67 serveErrors(); 67 serveErrors();
68 68
69 d.appDir({"foo": "any"}).create(); 69 d.appDir({"foo": "any"}).create();
70 70
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 d.cacheDir({ 113 d.cacheDir({
114 "foo": ["1.2.2", "1.2.3"] 114 "foo": ["1.2.2", "1.2.3"]
115 }, includePubspecs: true).create(); 115 }, includePubspecs: true).create();
116 116
117 d.appDir({"foo": "any"}).create(); 117 d.appDir({"foo": "any"}).create();
118 118
119 createLockFile('myapp', hosted: {'foo': '1.2.4'}); 119 createLockFile('myapp', hosted: {'foo': '1.2.4'});
120 120
121 pubCommand(command, args: ['--offline']); 121 pubCommand(command, args: ['--offline']);
122 122
123 d.packagesDir({"foo": "1.2.3"}).validate(); 123 d.appPackagesFile({"foo": "1.2.3"}).validate();
124 }); 124 });
125 }); 125 });
126 } 126 }
OLDNEW
« no previous file with comments | « test/get/switch_source_test.dart ('k') | test/hosted/remove_removed_dependency_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698