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 'package:pub/src/io.dart'; | |
6 | |
7 import '../../descriptor.dart' as d; | 5 import '../../descriptor.dart' as d; |
8 import '../../test_pub.dart'; | 6 import '../../test_pub.dart'; |
9 | 7 |
10 main() { | 8 main() { |
11 integration('activating a hosted package deactivates the Git one', () { | 9 integration('activating a hosted package deactivates the Git one', () { |
12 servePackages((builder) { | 10 servePackages((builder) { |
13 builder.serve("foo", "2.0.0", contents: [ | 11 builder.serve("foo", "2.0.0", contents: [ |
14 d.dir("bin", [ | 12 d.dir("bin", [ |
15 d.file("foo.dart", "main(args) => print('hosted');") | 13 d.file("foo.dart", "main(args) => print('hosted');") |
16 ]) | 14 ]) |
(...skipping 18 matching lines...) Expand all Loading... |
35 Loading source assets... | 33 Loading source assets... |
36 Precompiled foo:foo. | 34 Precompiled foo:foo. |
37 Activated foo 2.0.0."""); | 35 Activated foo 2.0.0."""); |
38 | 36 |
39 // Should now run the hosted one. | 37 // Should now run the hosted one. |
40 var pub = pubRun(global: true, args: ["foo"]); | 38 var pub = pubRun(global: true, args: ["foo"]); |
41 pub.stdout.expect("hosted"); | 39 pub.stdout.expect("hosted"); |
42 pub.shouldExit(); | 40 pub.shouldExit(); |
43 }); | 41 }); |
44 } | 42 } |
OLD | NEW |