OLD | NEW |
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 'package:path/path.dart' as path; | 5 import 'package:path/path.dart' as path; |
6 import 'package:pub/src/lock_file.dart'; | 6 import 'package:pub/src/lock_file.dart'; |
7 import 'package:pub/src/source_registry.dart'; | 7 import 'package:pub/src/source_registry.dart'; |
8 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
9 import 'package:unittest/unittest.dart'; | |
10 | 9 |
11 import '../../descriptor.dart' as d; | 10 import '../../descriptor.dart' as d; |
12 import '../../test_pub.dart'; | 11 import '../../test_pub.dart'; |
13 | 12 |
14 main() { | 13 main() { |
15 initConfig(); | |
16 integration("can use relative path", () { | 14 integration("can use relative path", () { |
17 d.dir("foo", [ | 15 d.dir("foo", [ |
18 d.libDir("foo"), | 16 d.libDir("foo"), |
19 d.libPubspec("foo", "0.0.1") | 17 d.libPubspec("foo", "0.0.1") |
20 ]).create(); | 18 ]).create(); |
21 | 19 |
22 d.dir(appPath, [ | 20 d.dir(appPath, [ |
23 d.appPubspec({ | 21 d.appPubspec({ |
24 "foo": {"path": "../foo"} | 22 "foo": {"path": "../foo"} |
25 }) | 23 }) |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 80 |
83 schedule(() { | 81 schedule(() { |
84 var lockfilePath = path.join(sandboxDir, appPath, "pubspec.lock"); | 82 var lockfilePath = path.join(sandboxDir, appPath, "pubspec.lock"); |
85 var lockfile = new LockFile.load(lockfilePath, new SourceRegistry()); | 83 var lockfile = new LockFile.load(lockfilePath, new SourceRegistry()); |
86 var description = lockfile.packages["foo"].description; | 84 var description = lockfile.packages["foo"].description; |
87 | 85 |
88 expect(path.isRelative(description["path"]), isTrue); | 86 expect(path.isRelative(description["path"]), isTrue); |
89 }); | 87 }); |
90 }); | 88 }); |
91 } | 89 } |
OLD | NEW |