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

Side by Side Diff: utils/tests/pub/install/path/shared_dependency_test.dart

Issue 14297021: Move pub into sdk/lib/_internal. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Disallow package: imports of pub. Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file
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 d.file.
4
5 import 'package:pathos/path.dart' as path;
6
7 import '../../descriptor.dart' as d;
8 import '../../test_pub.dart';
9
10 main() {
11 initConfig();
12 integration("shared dependency with same path", () {
13 d.dir("shared", [
14 d.libDir("shared"),
15 d.libPubspec("shared", "0.0.1")
16 ]).create();
17
18 d.dir("foo", [
19 d.libDir("foo"),
20 d.libPubspec("foo", "0.0.1", deps: [
21 {"path": "../shared"}
22 ])
23 ]).create();
24
25 d.dir("bar", [
26 d.libDir("bar"),
27 d.libPubspec("bar", "0.0.1", deps: [
28 {"path": "../shared"}
29 ])
30 ]).create();
31
32 d.dir(appPath, [
33 d.pubspec({
34 "name": "myapp",
35 "dependencies": {
36 "foo": {"path": "../foo"},
37 "bar": {"path": "../bar"}
38 }
39 })
40 ]).create();
41
42 schedulePub(args: ["install"],
43 output: new RegExp(r"Dependencies installed!$"));
44
45 d.dir(packagesPath, [
46 d.dir("foo", [d.file("foo.dart", 'main() => "foo";')]),
47 d.dir("bar", [d.file("bar.dart", 'main() => "bar";')]),
48 d.dir("shared", [d.file("shared.dart", 'main() => "shared";')])
49 ]).validate();
50 });
51
52 integration("shared dependency with paths that normalize the same", () {
53 d.dir("shared", [
54 d.libDir("shared"),
55 d.libPubspec("shared", "0.0.1")
56 ]).create();
57
58 d.dir("foo", [
59 d.libDir("foo"),
60 d.libPubspec("foo", "0.0.1", deps: [
61 {"path": "../shared"}
62 ])
63 ]).create();
64
65 d.dir("bar", [
66 d.libDir("bar"),
67 d.libPubspec("bar", "0.0.1", deps: [
68 {"path": "../././shared"}
69 ])
70 ]).create();
71
72 d.dir(appPath, [
73 d.pubspec({
74 "name": "myapp",
75 "dependencies": {
76 "foo": {"path": "../foo"},
77 "bar": {"path": "../bar"}
78 }
79 })
80 ]).create();
81
82 schedulePub(args: ["install"],
83 output: new RegExp(r"Dependencies installed!$"));
84
85 d.dir(packagesPath, [
86 d.dir("foo", [d.file("foo.dart", 'main() => "foo";')]),
87 d.dir("bar", [d.file("bar.dart", 'main() => "bar";')]),
88 d.dir("shared", [d.file("shared.dart", 'main() => "shared";')])
89 ]).validate();
90 });
91
92 integration("shared dependency with absolute and relative path", () {
93 d.dir("shared", [
94 d.libDir("shared"),
95 d.libPubspec("shared", "0.0.1")
96 ]).create();
97
98 d.dir("foo", [
99 d.libDir("foo"),
100 d.libPubspec("foo", "0.0.1", deps: [
101 {"path": "../shared"}
102 ])
103 ]).create();
104
105 d.dir("bar", [
106 d.libDir("bar"),
107 d.libPubspec("bar", "0.0.1", deps: [
108 {"path": path.join(sandboxDir, "shared")}
109 ])
110 ]).create();
111
112 d.dir(appPath, [
113 d.pubspec({
114 "name": "myapp",
115 "dependencies": {
116 "foo": {"path": "../foo"},
117 "bar": {"path": "../bar"}
118 }
119 })
120 ]).create();
121
122 schedulePub(args: ["install"],
123 output: new RegExp(r"Dependencies installed!$"));
124
125 d.dir(packagesPath, [
126 d.dir("foo", [d.file("foo.dart", 'main() => "foo";')]),
127 d.dir("bar", [d.file("bar.dart", 'main() => "bar";')]),
128 d.dir("shared", [d.file("shared.dart", 'main() => "shared";')])
129 ]).validate();
130 });
131 }
OLDNEW
« no previous file with comments | « utils/tests/pub/install/path/shared_dependency_symlink_test.dart ('k') | utils/tests/pub/install/pub_install_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698