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

Side by Side Diff: utils/tests/pub/pub_test.dart

Issue 10544041: "pubspec" -> "pubspec.yaml". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « utils/pub/package.dart ('k') | no next file » | 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 #library('pub_tests'); 5 #library('pub_tests');
6 6
7 #import('dart:io'); 7 #import('dart:io');
8 8
9 #import('test_pub.dart'); 9 #import('test_pub.dart');
10 #import('../../../lib/unittest/unittest.dart'); 10 #import('../../../lib/unittest/unittest.dart');
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 test('adds a dependent package', () { 89 test('adds a dependent package', () {
90 dir(sdkPath, [ 90 dir(sdkPath, [
91 dir('lib', [ 91 dir('lib', [
92 dir('foo', [ 92 dir('foo', [
93 file('foo.dart', 'main() => "foo";') 93 file('foo.dart', 'main() => "foo";')
94 ]) 94 ])
95 ]) 95 ])
96 ]).scheduleCreate(); 96 ]).scheduleCreate();
97 97
98 dir(appPath, [ 98 dir(appPath, [
99 file('pubspec', 'dependencies:\n foo:') 99 file('pubspec.yaml', 'dependencies:\n foo:')
100 ]).scheduleCreate(); 100 ]).scheduleCreate();
101 101
102 dir(packagesPath, [ 102 dir(packagesPath, [
103 dir('foo', [ 103 dir('foo', [
104 file('foo.dart', 'main() => "foo";') 104 file('foo.dart', 'main() => "foo";')
105 ]) 105 ])
106 ]).scheduleValidate(); 106 ]).scheduleValidate();
107 107
108 runPub(args: ['install'], 108 runPub(args: ['install'],
109 output: ''' 109 output: '''
110 Dependencies installed! 110 Dependencies installed!
111 '''); 111 ''');
112 }); 112 });
113 113
114 test('adds a transitively dependent package', () { 114 test('adds a transitively dependent package', () {
115 dir(sdkPath, [ 115 dir(sdkPath, [
116 dir('lib', [ 116 dir('lib', [
117 dir('foo', [ 117 dir('foo', [
118 file('foo.dart', 'main() => "foo";'), 118 file('foo.dart', 'main() => "foo";'),
119 file('pubspec', 'dependencies:\n bar:') 119 file('pubspec.yaml', 'dependencies:\n bar:')
120 ]), 120 ]),
121 dir('bar', [ 121 dir('bar', [
122 file('bar.dart', 'main() => "bar";'), 122 file('bar.dart', 'main() => "bar";'),
123 ]) 123 ])
124 ]) 124 ])
125 ]).scheduleCreate(); 125 ]).scheduleCreate();
126 126
127 dir(appPath, [ 127 dir(appPath, [
128 file('pubspec', 'dependencies:\n foo:') 128 file('pubspec.yaml', 'dependencies:\n foo:')
129 ]).scheduleCreate(); 129 ]).scheduleCreate();
130 130
131 dir(packagesPath, [ 131 dir(packagesPath, [
132 dir('foo', [ 132 dir('foo', [
133 file('foo.dart', 'main() => "foo";') 133 file('foo.dart', 'main() => "foo";')
134 ]), 134 ]),
135 dir('bar', [ 135 dir('bar', [
136 file('bar.dart', 'main() => "bar";'), 136 file('bar.dart', 'main() => "bar";'),
137 ]) 137 ])
138 ]).scheduleValidate(); 138 ]).scheduleValidate();
139 139
140 runPub(args: ['install'], 140 runPub(args: ['install'],
141 output: ''' 141 output: '''
142 Dependencies installed! 142 Dependencies installed!
143 '''); 143 ''');
144 }); 144 });
145 145
146 test('checks out a package from Git', () { 146 test('checks out a package from Git', () {
147 withGit(() { 147 withGit(() {
148 git('foo.git', [ 148 git('foo.git', [
149 file('foo.dart', 'main() => "foo";') 149 file('foo.dart', 'main() => "foo";')
150 ]).scheduleCreate(); 150 ]).scheduleCreate();
151 151
152 dir(appPath, [ 152 dir(appPath, [
153 file('pubspec', ''' 153 file('pubspec.yaml', '''
154 dependencies: 154 dependencies:
155 foo: 155 foo:
156 git: ../foo.git 156 git: ../foo.git
157 ''') 157 ''')
158 ]).scheduleCreate(); 158 ]).scheduleCreate();
159 159
160 dir(packagesPath, [ 160 dir(packagesPath, [
161 dir('foo', [ 161 dir('foo', [
162 file('foo.dart', 'main() => "foo";') 162 file('foo.dart', 'main() => "foo";')
163 ]) 163 ])
164 ]).scheduleValidate(); 164 ]).scheduleValidate();
165 165
166 runPub(args: ['install'], 166 runPub(args: ['install'],
167 output: const RegExp(@"Dependencies installed!$")); 167 output: const RegExp(@"Dependencies installed!$"));
168 }); 168 });
169 }); 169 });
170 170
171 test('checks out packages transitively from Git', () { 171 test('checks out packages transitively from Git', () {
172 withGit(() { 172 withGit(() {
173 git('foo.git', [ 173 git('foo.git', [
174 file('foo.dart', 'main() => "foo";'), 174 file('foo.dart', 'main() => "foo";'),
175 file('pubspec', ''' 175 file('pubspec.yaml', '''
176 dependencies: 176 dependencies:
177 bar: 177 bar:
178 git: ../bar.git 178 git: ../bar.git
179 ''') 179 ''')
180 ]).scheduleCreate(); 180 ]).scheduleCreate();
181 181
182 git('bar.git', [ 182 git('bar.git', [
183 file('bar.dart', 'main() => "bar";') 183 file('bar.dart', 'main() => "bar";')
184 ]).scheduleCreate(); 184 ]).scheduleCreate();
185 185
186 dir(appPath, [ 186 dir(appPath, [
187 file('pubspec', ''' 187 file('pubspec.yaml', '''
188 dependencies: 188 dependencies:
189 foo: 189 foo:
190 git: ../foo.git 190 git: ../foo.git
191 ''') 191 ''')
192 ]).scheduleCreate(); 192 ]).scheduleCreate();
193 193
194 dir(packagesPath, [ 194 dir(packagesPath, [
195 dir('foo', [ 195 dir('foo', [
196 file('foo.dart', 'main() => "foo";') 196 file('foo.dart', 'main() => "foo";')
197 ]), 197 ]),
198 dir('bar', [ 198 dir('bar', [
199 file('bar.dart', 'main() => "bar";') 199 file('bar.dart', 'main() => "bar";')
200 ]) 200 ])
201 ]).scheduleValidate(); 201 ]).scheduleValidate();
202 202
203 runPub(args: ['install'], 203 runPub(args: ['install'],
204 output: const RegExp("Dependencies installed!\$")); 204 output: const RegExp("Dependencies installed!\$"));
205 }); 205 });
206 }); 206 });
207 } 207 }
208 208
209 versionCommand() { 209 versionCommand() {
210 test('displays the current version', () => 210 test('displays the current version', () =>
211 runPub(args: ['version'], output: VERSION_STRING)); 211 runPub(args: ['version'], output: VERSION_STRING));
212 } 212 }
OLDNEW
« no previous file with comments | « utils/pub/package.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698