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

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

Issue 12794007: Use scheduled_test for Pub tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. 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 import '../../../../../pkg/scheduled_test/lib/scheduled_test.dart';
6 7
8 import '../../../../pub/io.dart';
9 import '../../descriptor.dart' as d;
7 import '../../test_pub.dart'; 10 import '../../test_pub.dart';
8 11
9 main() { 12 main() {
10 initConfig(); 13 initConfig();
11 integration('path dependency with absolute path', () { 14 integration('path dependency with absolute path', () {
12 dir('foo', [ 15 d.dir('foo', [
13 libDir('foo'), 16 d.libDir('foo'),
14 libPubspec('foo', '0.0.1') 17 d.libPubspec('foo', '0.0.1')
15 ]).scheduleCreate(); 18 ]).create();
16 19
17 dir(appPath, [ 20 d.dir(appPath, [
18 pubspec({ 21 d.pubspec({
19 "name": "myapp", 22 "name": "myapp",
20 "dependencies": { 23 "dependencies": {
21 "foo": {"path": path.join(sandboxDir, "foo")} 24 "foo": {"path": path.join(sandboxDir, "foo")}
22 } 25 }
23 }) 26 })
24 ]).scheduleCreate(); 27 ]).create();
25 28
26 schedulePub(args: ["install"], 29 schedulePub(args: ["install"],
27 output: new RegExp(r"Dependencies installed!$")); 30 output: new RegExp(r"Dependencies installed!$"));
28 31
29 dir(packagesPath, [ 32 d.dir(packagesPath, [
30 dir("foo", [ 33 d.dir("foo", [
31 file("foo.dart", 'main() => "foo";') 34 d.file("foo.dart", 'main() => "foo";')
32 ]) 35 ])
33 ]).scheduleValidate(); 36 ]).validate();
34 37
35 // Move the packages directory and ensure the symlink still works. That 38 // Move the packages directory and ensure the symlink still works. That
36 // will validate that we actually created an absolute symlink. 39 // will validate that we actually created an absolute symlink.
37 dir("moved").scheduleCreate(); 40 d.dir("moved").create();
38 scheduleRename(packagesPath, "moved/packages"); 41 scheduleRename(packagesPath, "moved/packages");
39 42
40 dir("moved/packages", [ 43 d.dir("moved/packages", [
41 dir("foo", [ 44 d.dir("foo", [
42 file("foo.dart", 'main() => "foo";') 45 d.file("foo.dart", 'main() => "foo";')
43 ]) 46 ])
44 ]).scheduleValidate(); 47 ]).validate();
45 }); 48 });
46 } 49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698