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

Side by Side Diff: sdk/lib/_internal/pub/test/get/path/shared_dependency_test.dart

Issue 1165473002: Start pulling pub from its own repo. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review changes Created 5 years, 6 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
(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:path/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 "shared": {"path": "../shared"}
22 })
23 ]).create();
24
25 d.dir("bar", [
26 d.libDir("bar"),
27 d.libPubspec("bar", "0.0.1", deps: {
28 "shared": {"path": "../shared"}
29 })
30 ]).create();
31
32 d.dir(appPath, [
33 d.appPubspec({
34 "foo": {"path": "../foo"},
35 "bar": {"path": "../bar"}
36 })
37 ]).create();
38
39 pubGet();
40
41 d.dir(packagesPath, [
42 d.dir("foo", [d.file("foo.dart", 'main() => "foo";')]),
43 d.dir("bar", [d.file("bar.dart", 'main() => "bar";')]),
44 d.dir("shared", [d.file("shared.dart", 'main() => "shared";')])
45 ]).validate();
46 });
47
48 integration("shared dependency with paths that normalize the same", () {
49 d.dir("shared", [
50 d.libDir("shared"),
51 d.libPubspec("shared", "0.0.1")
52 ]).create();
53
54 d.dir("foo", [
55 d.libDir("foo"),
56 d.libPubspec("foo", "0.0.1", deps: {
57 "shared": {"path": "../shared"}
58 })
59 ]).create();
60
61 d.dir("bar", [
62 d.libDir("bar"),
63 d.libPubspec("bar", "0.0.1", deps: {
64 "shared": {"path": "../././shared"}
65 })
66 ]).create();
67
68 d.dir(appPath, [
69 d.appPubspec({
70 "foo": {"path": "../foo"},
71 "bar": {"path": "../bar"}
72 })
73 ]).create();
74
75 pubGet();
76
77 d.dir(packagesPath, [
78 d.dir("foo", [d.file("foo.dart", 'main() => "foo";')]),
79 d.dir("bar", [d.file("bar.dart", 'main() => "bar";')]),
80 d.dir("shared", [d.file("shared.dart", 'main() => "shared";')])
81 ]).validate();
82 });
83
84 integration("shared dependency with absolute and relative path", () {
85 d.dir("shared", [
86 d.libDir("shared"),
87 d.libPubspec("shared", "0.0.1")
88 ]).create();
89
90 d.dir("foo", [
91 d.libDir("foo"),
92 d.libPubspec("foo", "0.0.1", deps: {
93 "shared": {"path": "../shared"}
94 })
95 ]).create();
96
97 d.dir("bar", [
98 d.libDir("bar"),
99 d.libPubspec("bar", "0.0.1", deps: {
100 "shared": {"path": path.join(sandboxDir, "shared")}
101 })
102 ]).create();
103
104 d.dir(appPath, [
105 d.appPubspec({
106 "foo": {"path": "../foo"},
107 "bar": {"path": "../bar"}
108 })
109 ]).create();
110
111 pubGet();
112
113 d.dir(packagesPath, [
114 d.dir("foo", [d.file("foo.dart", 'main() => "foo";')]),
115 d.dir("bar", [d.file("bar.dart", 'main() => "bar";')]),
116 d.dir("shared", [d.file("shared.dart", 'main() => "shared";')])
117 ]).validate();
118 });
119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698