OLD | NEW |
1 // Copyright (c) 2015, 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('loads package imports 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", [ | 12 d.dir("lib", [ |
13 d.file('foo.dart', "final value = 'foobar';") | 13 d.file('foo.dart', "final value = 'foobar';") |
14 ]), | 14 ]), |
15 d.dir("bin", [ | 15 d.dir("bin", [ |
16 d.file("bar.dart", """ | 16 d.file("bar.dart", """ |
17 import "package:foo/foo.dart"; | 17 import "package:foo/foo.dart"; |
18 | 18 |
19 main() => print(value); | 19 main() => print(value); |
20 """) | 20 """) |
21 ]) | 21 ]) |
22 ]).create(); | 22 ]).create(); |
23 | 23 |
24 d.dir(appPath, [ | 24 d.dir(appPath, [ |
25 d.appPubspec({ | 25 d.appPubspec({ |
26 "foo": {"path": "../foo"} | 26 "foo": {"path": "../foo"} |
27 }) | 27 }) |
28 ]).create(); | 28 ]).create(); |
29 | 29 |
30 pubGet(); | 30 pubGet(); |
31 | 31 |
32 var pub = pubRun(args: ["foo:bar"]); | 32 var pub = pubRun(args: ["foo:bar"]); |
33 pub.stdout.expect("foobar"); | 33 pub.stdout.expect("foobar"); |
34 pub.shouldExit(); | 34 pub.shouldExit(); |
35 }); | 35 }); |
36 } | 36 } |
OLD | NEW |