| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE d.file. | |
| 4 | |
| 5 import '../../descriptor.dart' as d; | |
| 6 import '../../test_pub.dart'; | |
| 7 | |
| 8 main() { | |
| 9 initConfig(); | |
| 10 integration("can use relative path", () { | |
| 11 d.dir("foo", [ | |
| 12 d.libDir("foo"), | |
| 13 d.libPubspec("foo", "0.0.1") | |
| 14 ]).create(); | |
| 15 | |
| 16 d.dir(appPath, [ | |
| 17 d.appPubspec({ | |
| 18 "foo": {"path": "../foo"} | |
| 19 }) | |
| 20 ]).create(); | |
| 21 | |
| 22 pubInstall(); | |
| 23 | |
| 24 d.dir(packagesPath, [ | |
| 25 d.dir("foo", [ | |
| 26 d.file("foo.dart", 'main() => "foo";') | |
| 27 ]) | |
| 28 ]).validate(); | |
| 29 }); | |
| 30 | |
| 31 integration("path is relative to containing d.pubspec", () { | |
| 32 d.dir("relative", [ | |
| 33 d.dir("foo", [ | |
| 34 d.libDir("foo"), | |
| 35 d.libPubspec("foo", "0.0.1", deps: { | |
| 36 "bar": {"path": "../bar"} | |
| 37 }) | |
| 38 ]), | |
| 39 d.dir("bar", [ | |
| 40 d.libDir("bar"), | |
| 41 d.libPubspec("bar", "0.0.1") | |
| 42 ]) | |
| 43 ]).create(); | |
| 44 | |
| 45 d.dir(appPath, [ | |
| 46 d.appPubspec({ | |
| 47 "foo": {"path": "../relative/foo"} | |
| 48 }) | |
| 49 ]).create(); | |
| 50 | |
| 51 pubInstall(); | |
| 52 | |
| 53 d.dir(packagesPath, [ | |
| 54 d.dir("foo", [ | |
| 55 d.file("foo.dart", 'main() => "foo";') | |
| 56 ]), | |
| 57 d.dir("bar", [ | |
| 58 d.file("bar.dart", 'main() => "bar";') | |
| 59 ]) | |
| 60 ]).validate(); | |
| 61 }); | |
| 62 } | |
| OLD | NEW |