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

Side by Side Diff: utils/tests/pub/install/pub_install_test.dart

Issue 13132002: Version 0.4.3.5 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: 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
« no previous file with comments | « utils/tests/pub/install/hosted/stay_locked_test.dart ('k') | utils/tests/pub/io_test.dart » ('j') | 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 d.file 1 // Copyright (c) 2012, 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 d.file. 3 // BSD-style license that can be found in the LICENSE d.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 '../../../../pkg/pathos/lib/path.dart' as path;
9 import '../../../../pkg/scheduled_test/lib/scheduled_test.dart'; 10 import '../../../../pkg/scheduled_test/lib/scheduled_test.dart';
10 11
12 import '../../../pub/io.dart';
11 import '../descriptor.dart' as d; 13 import '../descriptor.dart' as d;
12 import '../test_pub.dart'; 14 import '../test_pub.dart';
13 15
14 main() { 16 main() {
15 initConfig(); 17 initConfig();
16 18
17 group('requires', () { 19 group('requires', () {
18 integration('a pubspec', () { 20 integration('a pubspec', () {
19 d.dir(appPath, []).create(); 21 d.dir(appPath, []).create();
20 22
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 109
108 schedulePub(args: ['install'], 110 schedulePub(args: ['install'],
109 output: new RegExp(r"Dependencies installed!$")); 111 output: new RegExp(r"Dependencies installed!$"));
110 112
111 d.dir(packagesPath, [ 113 d.dir(packagesPath, [
112 d.nothing('foo'), 114 d.nothing('foo'),
113 d.dir('myapp', [d.file('myapp.dart', 'main() => "myapp";')]) 115 d.dir('myapp', [d.file('myapp.dart', 'main() => "myapp";')])
114 ]).validate(); 116 ]).validate();
115 }); 117 });
116 118
119 integration('overwrites a broken packages directory symlink', () {
120 d.dir(appPath, [
121 d.appPubspec([]),
122 d.dir('packages'),
123 d.libDir('myapp'),
124 d.dir('bin')
125 ]).create();
126
127 scheduleSymlink(
128 path.join(appPath, 'packages'),
129 path.join(appPath, 'bin', 'packages'));
130
131 schedule(() => deleteEntry(path.join(sandboxDir, appPath, 'packages')));
132
133 schedulePub(args: ['install'],
134 output: new RegExp(r"Dependencies installed!$"));
135
136 d.dir(packagesPath, [
137 d.nothing('foo'),
138 d.dir('myapp', [d.file('myapp.dart', 'main() => "myapp";')])
139 ]).validate();
140 });
141
117 group('creates a packages directory in', () { 142 group('creates a packages directory in', () {
118 integration('"test/" and its subdirectories', () { 143 integration('"test/" and its subdirectories', () {
119 d.dir(appPath, [ 144 d.dir(appPath, [
120 d.appPubspec([]), 145 d.appPubspec([]),
121 d.libDir('foo'), 146 d.libDir('foo'),
122 d.dir("test", [d.dir("subtest")]) 147 d.dir("test", [d.dir("subtest")])
123 ]).create(); 148 ]).create();
124 149
125 schedulePub(args: ['install'], 150 schedulePub(args: ['install'],
126 output: new RegExp(r"Dependencies installed!$")); 151 output: new RegExp(r"Dependencies installed!$"));
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 d.dir("packages", [ 267 d.dir("packages", [
243 d.dir("myapp", [ 268 d.dir("myapp", [
244 d.file('foo.dart', 'main() => "foo";') 269 d.file('foo.dart', 'main() => "foo";')
245 ]) 270 ])
246 ]) 271 ])
247 ]) 272 ])
248 ]).validate(); 273 ]).validate();
249 }); 274 });
250 }); 275 });
251 } 276 }
OLDNEW
« no previous file with comments | « utils/tests/pub/install/hosted/stay_locked_test.dart ('k') | utils/tests/pub/io_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698