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

Side by Side Diff: sdk/lib/_internal/pub/test/install/path/relative_symlink_test.dart

Issue 19503006: Use appPubspec() in more places. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 d.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 d.file. 3 // BSD-style license that can be found in the LICENSE d.file.
4 4
5 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:path/path.dart' as path; 7 import 'package:path/path.dart' as path;
8 8
9 import '../../../lib/src/exit_codes.dart' as exit_codes; 9 import '../../../lib/src/exit_codes.dart' as exit_codes;
10 import '../../descriptor.dart' as d; 10 import '../../descriptor.dart' as d;
11 import '../../test_pub.dart'; 11 import '../../test_pub.dart';
12 12
13 main() { 13 main() {
14 // Pub uses NTFS junction points to create links in the packages directory. 14 // Pub uses NTFS junction points to create links in the packages directory.
15 // These (unlike the symlinks that are supported in Vista and later) do not 15 // These (unlike the symlinks that are supported in Vista and later) do not
16 // support relative paths. So this test, by design, will not pass on Windows. 16 // support relative paths. So this test, by design, will not pass on Windows.
17 // So just skip it. 17 // So just skip it.
18 if (Platform.operatingSystem == "windows") return; 18 if (Platform.operatingSystem == "windows") return;
19 19
20 initConfig(); 20 initConfig();
21 integration("generates a symlink with a relative path if the dependency " 21 integration("generates a symlink with a relative path if the dependency "
22 "path was relative", () { 22 "path was relative", () {
23 d.dir("foo", [ 23 d.dir("foo", [
24 d.libDir("foo"), 24 d.libDir("foo"),
25 d.libPubspec("foo", "0.0.1") 25 d.libPubspec("foo", "0.0.1")
26 ]).create(); 26 ]).create();
27 27
28 d.dir(appPath, [ 28 d.dir(appPath, [
29 d.pubspec({ 29 d.appPubspec({
30 "name": "myapp", 30 "foo": {"path": "../foo"}
31 "dependencies": {
32 "foo": {"path": "../foo"}
33 }
34 }) 31 })
35 ]).create(); 32 ]).create();
36 33
37 pubInstall(); 34 pubInstall();
38 35
39 d.dir("moved").create(); 36 d.dir("moved").create();
40 37
41 // Move the app and package. Since they are still next to each other, it 38 // Move the app and package. Since they are still next to each other, it
42 // should still be found. 39 // should still be found.
43 scheduleRename("foo", path.join("moved", "foo")); 40 scheduleRename("foo", path.join("moved", "foo"));
44 scheduleRename(appPath, path.join("moved", appPath)); 41 scheduleRename(appPath, path.join("moved", appPath));
45 42
46 d.dir("moved", [ 43 d.dir("moved", [
47 d.dir(packagesPath, [ 44 d.dir(packagesPath, [
48 d.dir("foo", [ 45 d.dir("foo", [
49 d.file("foo.dart", 'main() => "foo";') 46 d.file("foo.dart", 'main() => "foo";')
50 ]) 47 ])
51 ]) 48 ])
52 ]).validate(); 49 ]).validate();
53 }); 50 });
54 } 51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698