OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 shorthand Dart application in a dependency', () { | 9 integration('runs a shorthand 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("bin", [ | 12 d.dir("bin", [ |
13 d.file("foo.dart", "main() => print('foo');") | 13 d.file("foo.dart", "main() => print('foo');") |
14 ]) | 14 ]) |
15 ]).create(); | 15 ]).create(); |
16 | 16 |
17 d.dir(appPath, [ | 17 d.dir(appPath, [ |
18 d.pubspec({ | 18 d.pubspec({ |
19 "name": "myapp", | 19 "name": "myapp", |
20 "dependencies": { | 20 "dependencies": { |
21 "foo": {"path": "../foo"} | 21 "foo": {"path": "../foo"} |
22 } | 22 } |
23 }) | 23 }) |
24 ]).create(); | 24 ]).create(); |
25 | 25 |
26 var pub = pubRun(args: ["foo"], shouldGetFirst: true); | 26 pubGet(); |
| 27 var pub = pubRun(args: ["foo"]); |
27 pub.stdout.expect("foo"); | 28 pub.stdout.expect("foo"); |
28 pub.shouldExit(); | 29 pub.shouldExit(); |
29 }); | 30 }); |
30 } | 31 } |
OLD | NEW |