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

Side by Side Diff: test/get/broken_symlink_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
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:path/path.dart' as path; 5 import 'package:path/path.dart' as path;
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() {
11 integration('replaces a broken "packages" symlink', () { 11 integration('replaces a broken "packages" symlink', () {
12 d.dir(appPath, [ 12 d.dir(appPath, [
13 d.appPubspec(), 13 d.appPubspec(),
14 d.libDir('foo'), 14 d.libDir('foo'),
15 d.dir("bin") 15 d.dir("bin")
16 ]).create(); 16 ]).create();
17 17
18 // Create a broken "packages" symlink in "bin". 18 // Create a broken "packages" symlink in "bin".
19 scheduleSymlink("nonexistent", path.join(appPath, "packages")); 19 scheduleSymlink("nonexistent", path.join(appPath, "packages"));
20 20
21 pubGet(); 21 pubGet(args: ["--packages-dir"]);
22 22
23 d.dir(appPath, [ 23 d.dir(appPath, [
24 d.dir("bin", [ 24 d.dir("bin", [
25 d.dir("packages", [ 25 d.dir("packages", [
26 d.dir("myapp", [ 26 d.dir("myapp", [
27 d.file('foo.dart', 'main() => "foo";') 27 d.file('foo.dart', 'main() => "foo";')
28 ]) 28 ])
29 ]) 29 ])
30 ]) 30 ])
31 ]).validate(); 31 ]).validate();
32 }); 32 });
33 33
34 integration('replaces a broken secondary "packages" symlink', () { 34 integration('replaces a broken secondary "packages" symlink', () {
35 d.dir(appPath, [ 35 d.dir(appPath, [
36 d.appPubspec(), 36 d.appPubspec(),
37 d.libDir('foo'), 37 d.libDir('foo'),
38 d.dir("bin") 38 d.dir("bin")
39 ]).create(); 39 ]).create();
40 40
41 // Create a broken "packages" symlink in "bin". 41 // Create a broken "packages" symlink in "bin".
42 scheduleSymlink("nonexistent", path.join(appPath, "bin", "packages")); 42 scheduleSymlink("nonexistent", path.join(appPath, "bin", "packages"));
43 43
44 pubGet(); 44 pubGet(args: ["--packages-dir"]);
45 45
46 d.dir(appPath, [ 46 d.dir(appPath, [
47 d.dir("bin", [ 47 d.dir("bin", [
48 d.dir("packages", [ 48 d.dir("packages", [
49 d.dir("myapp", [ 49 d.dir("myapp", [
50 d.file('foo.dart', 'main() => "foo";') 50 d.file('foo.dart', 'main() => "foo";')
51 ]) 51 ])
52 ]) 52 ])
53 ]) 53 ])
54 ]).validate(); 54 ]).validate();
55 }); 55 });
56 } 56 }
OLDNEW
« no previous file with comments | « test/downgrade/unlock_if_necessary_test.dart ('k') | test/get/git/check_out_and_upgrade_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698