| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2015, 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 '../descriptor.dart' as d; | |
| 6 import '../test_pub.dart'; | |
| 7 import '../serve/utils.dart'; | |
| 8 | |
| 9 main() { | |
| 10 initConfig(); | |
| 11 // Regression test for issue 23113 | |
| 12 integration('runs a named Dart application in a dependency', () { | |
| 13 servePackages((builder) { | |
| 14 builder.serve('foo', '1.0.0', pubspec: { | |
| 15 'name': 'foo', | |
| 16 'version': '1.0.0' | |
| 17 }, contents: [ | |
| 18 d.dir("bin", [ | |
| 19 d.file("bar.dart", "main() => print('foobar');") | |
| 20 ]) | |
| 21 ]); | |
| 22 }); | |
| 23 | |
| 24 d.dir(appPath, [ | |
| 25 d.appPubspec({"foo": null}) | |
| 26 ]).create(); | |
| 27 | |
| 28 pubGet(); | |
| 29 | |
| 30 var pub = pubRun(args: ["foo:bar"]); | |
| 31 pub.stdout.expect("foobar"); | |
| 32 pub.shouldExit(); | |
| 33 | |
| 34 d.dir("foo", [ | |
| 35 d.libPubspec("foo", "2.0.0"), | |
| 36 d.dir("bin", [ | |
| 37 d.file("bar.dart", "main() => print('different');") | |
| 38 ]) | |
| 39 ]).create(); | |
| 40 | |
| 41 d.dir(appPath, [ | |
| 42 d.pubspec({ | |
| 43 "name": "myapp", | |
| 44 "dependencies": {"foo": {"path": "../foo"}} | |
| 45 }) | |
| 46 ]).create(); | |
| 47 | |
| 48 pubGet(); | |
| 49 | |
| 50 pub = pubRun(args: ["foo:bar"]); | |
| 51 pub.stdout.expect("different"); | |
| 52 pub.shouldExit(); | |
| 53 }); | |
| 54 } | |
| OLD | NEW |