| Index: sdk/lib/_internal/pub/test/global/activate/activate_git_after_hosted_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/global/activate/activate_path_after_hosted_test.dart b/sdk/lib/_internal/pub/test/global/activate/activate_git_after_hosted_test.dart
|
| similarity index 54%
|
| copy from sdk/lib/_internal/pub/test/global/activate/activate_path_after_hosted_test.dart
|
| copy to sdk/lib/_internal/pub/test/global/activate/activate_git_after_hosted_test.dart
|
| index fa744878f26f8844c8138ddbbbd5bf2ae9c01652..a553f5f4bb34b5f374ef03e4718f1a0454be68e3 100644
|
| --- a/sdk/lib/_internal/pub/test/global/activate/activate_path_after_hosted_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/global/activate/activate_git_after_hosted_test.dart
|
| @@ -2,15 +2,14 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -import 'package:path/path.dart' as p;
|
| -
|
| -import '../../../lib/src/io.dart';
|
| import '../../descriptor.dart' as d;
|
| import '../../test_pub.dart';
|
|
|
| main() {
|
| initConfig();
|
| - integration('activating a hosted package deactivates the path one', () {
|
| + integration('activating a Git package deactivates the hosted one', () {
|
| + ensureGit();
|
| +
|
| servePackages([
|
| packageMap("foo", "1.0.0")
|
| ], contents: [
|
| @@ -19,23 +18,24 @@ main() {
|
| ])
|
| ]);
|
|
|
| - d.dir("foo", [
|
| - d.libPubspec("foo", "2.0.0"),
|
| + d.git('foo.git', [
|
| + d.libPubspec("foo", "1.0.0"),
|
| d.dir("bin", [
|
| - d.file("foo.dart", "main() => print('path');")
|
| + d.file("foo.dart", "main() => print('git');")
|
| ])
|
| ]).create();
|
|
|
| schedulePub(args: ["global", "activate", "foo"]);
|
|
|
| - var path = canonicalize(p.join(sandboxDir, "foo"));
|
| - schedulePub(args: ["global", "activate", "-spath", "../foo"], output: """
|
| - Package foo is currently active at version 1.0.0.
|
| - Activated foo 2.0.0 at path "$path".""");
|
| + schedulePub(args: ["global", "activate", "-sgit", "../foo.git"],
|
| + output: """
|
| + Package foo is currently active at version 1.0.0.
|
| + Resolving dependencies...
|
| + Activated foo 1.0.0 from Git repository "../foo.git".""");
|
|
|
| - // Should now run the path one.
|
| + // Should now run the git one.
|
| var pub = pubRun(global: true, args: ["foo"]);
|
| - pub.stdout.expect("path");
|
| + pub.stdout.expect("git");
|
| pub.shouldExit();
|
| });
|
| }
|
|
|