| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import '../descriptor.dart' as d; | 5 import '../descriptor.dart' as d; |
| 6 import '../test_pub.dart'; | 6 import '../test_pub.dart'; |
| 7 | 7 |
| 8 main() { | 8 main() { |
| 9 integration('runs a named Dart application in a dependency', () { | 9 integration('runs a named Dart application in a dependency', () { |
| 10 d.dir("foo", [ | 10 d.dir("foo", [ |
| 11 d.libPubspec("foo", "1.0.0"), | 11 d.libPubspec("foo", "1.0.0"), |
| 12 d.dir("lib", [ |
| 13 d.file('foo.dart', "final value = 'foobar';") |
| 14 ]), |
| 12 d.dir("bin", [ | 15 d.dir("bin", [ |
| 13 d.file("bar.dart", "main() => print('foobar');") | 16 d.file("bar.dart", """ |
| 17 import "package:foo/foo.dart"; |
| 18 |
| 19 main() => print(value); |
| 20 """) |
| 14 ]) | 21 ]) |
| 15 ]).create(); | 22 ]).create(); |
| 16 | 23 |
| 17 d.dir(appPath, [ | 24 d.dir(appPath, [ |
| 18 d.appPubspec({ | 25 d.appPubspec({ |
| 19 "foo": {"path": "../foo"} | 26 "foo": {"path": "../foo"} |
| 20 }) | 27 }) |
| 21 ]).create(); | 28 ]).create(); |
| 22 | 29 |
| 23 pubGet(); | 30 pubGet(); |
| 24 | 31 |
| 25 var pub = pubRun(args: ["foo:bar"]); | 32 var pub = pubRun(args: ["foo:bar"]); |
| 26 pub.stdout.expect("foobar"); | 33 pub.stdout.expect("foobar"); |
| 27 pub.shouldExit(); | 34 pub.shouldExit(); |
| 28 }); | 35 }); |
| 29 } | 36 } |
| OLD | NEW |