OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS 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 file. |
| 4 |
| 5 import '../../../pkg/pathos/lib/path.dart' as path; |
| 6 |
| 7 import 'test_pub.dart'; |
| 8 |
| 9 main() { |
| 10 initConfig(); |
| 11 integration("includes root package's dev dependencies", () { |
| 12 dir('foo', [ |
| 13 libDir('foo'), |
| 14 libPubspec('foo', '0.0.1') |
| 15 ]).scheduleCreate(); |
| 16 |
| 17 dir('bar', [ |
| 18 libDir('bar'), |
| 19 libPubspec('bar', '0.0.1') |
| 20 ]).scheduleCreate(); |
| 21 |
| 22 dir(appPath, [ |
| 23 pubspec({ |
| 24 "name": "myapp", |
| 25 "dev_dependencies": { |
| 26 "foo": {"path": "../foo"}, |
| 27 "bar": {"path": "../bar"}, |
| 28 } |
| 29 }) |
| 30 ]).scheduleCreate(); |
| 31 |
| 32 schedulePub(args: ["install"], |
| 33 output: new RegExp(r"Dependencies installed!$")); |
| 34 |
| 35 dir(packagesPath, [ |
| 36 dir("foo", [ |
| 37 file("foo.dart", 'main() => "foo";') |
| 38 ]), |
| 39 dir("bar", [ |
| 40 file("bar.dart", 'main() => "bar";') |
| 41 ]) |
| 42 ]).scheduleValidate(); |
| 43 }); |
| 44 |
| 45 integration("includes dev dependency's transitive dependencies", () { |
| 46 dir('foo', [ |
| 47 libDir('foo'), |
| 48 libPubspec('foo', '0.0.1', deps: [ |
| 49 {"path": "../bar"} |
| 50 ]) |
| 51 ]).scheduleCreate(); |
| 52 |
| 53 dir('bar', [ |
| 54 libDir('bar'), |
| 55 libPubspec('bar', '0.0.1') |
| 56 ]).scheduleCreate(); |
| 57 |
| 58 dir(appPath, [ |
| 59 pubspec({ |
| 60 "name": "myapp", |
| 61 "dev_dependencies": { |
| 62 "foo": {"path": "../foo"} |
| 63 } |
| 64 }) |
| 65 ]).scheduleCreate(); |
| 66 |
| 67 schedulePub(args: ["install"], |
| 68 output: new RegExp(r"Dependencies installed!$")); |
| 69 |
| 70 dir(packagesPath, [ |
| 71 dir("foo", [ |
| 72 file("foo.dart", 'main() => "foo";') |
| 73 ]), |
| 74 dir("bar", [ |
| 75 file("bar.dart", 'main() => "bar";') |
| 76 ]) |
| 77 ]).scheduleValidate(); |
| 78 }); |
| 79 |
| 80 integration("ignores transitive dependency's dev dependencies", () { |
| 81 dir('foo', [ |
| 82 libDir('foo'), |
| 83 pubspec({ |
| 84 "name": "foo", |
| 85 "version": "0.0.1", |
| 86 "dev_dependencies": { |
| 87 "bar": {"path": "../bar"} |
| 88 } |
| 89 }) |
| 90 ]).scheduleCreate(); |
| 91 |
| 92 dir('bar', [ |
| 93 libDir('bar'), |
| 94 libPubspec('bar', '0.0.1') |
| 95 ]).scheduleCreate(); |
| 96 |
| 97 dir(appPath, [ |
| 98 pubspec({ |
| 99 "name": "myapp", |
| 100 "dependencies": { |
| 101 "foo": {"path": "../foo"} |
| 102 } |
| 103 }) |
| 104 ]).scheduleCreate(); |
| 105 |
| 106 schedulePub(args: ["install"], |
| 107 output: new RegExp(r"Dependencies installed!$")); |
| 108 |
| 109 dir(packagesPath, [ |
| 110 dir("foo", [ |
| 111 file("foo.dart", 'main() => "foo";') |
| 112 ]), |
| 113 nothing("bar") |
| 114 ]).scheduleValidate(); |
| 115 }); |
| 116 } |
OLD | NEW |