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

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

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