Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: test/global/activate/activate_hosted_after_git_test.dart

Issue 1556243002: Fix analyzer hints and warnings in test/. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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:path/path.dart' as p;
6 import 'package:pub/src/io.dart'; 5 import 'package:pub/src/io.dart';
7 6
8 import '../../descriptor.dart' as d; 7 import '../../descriptor.dart' as d;
9 import '../../test_pub.dart'; 8 import '../../test_pub.dart';
10 9
11 main() { 10 main() {
12 integration('activating a hosted package deactivates the Git one', () { 11 integration('activating a hosted package deactivates the Git one', () {
13 servePackages((builder) { 12 servePackages((builder) {
14 builder.serve("foo", "2.0.0", contents: [ 13 builder.serve("foo", "2.0.0", contents: [
15 d.dir("bin", [ 14 d.dir("bin", [
16 d.file("foo.dart", "main(args) => print('hosted');") 15 d.file("foo.dart", "main(args) => print('hosted');")
17 ]) 16 ])
18 ]); 17 ]);
19 }); 18 });
20 19
21 d.git('foo.git', [ 20 d.git('foo.git', [
22 d.libPubspec("foo", "1.0.0"), 21 d.libPubspec("foo", "1.0.0"),
23 d.dir("bin", [ 22 d.dir("bin", [
24 d.file("foo.dart", "main() => print('git');") 23 d.file("foo.dart", "main() => print('git');")
25 ]) 24 ])
26 ]).create(); 25 ]).create();
27 26
28 schedulePub(args: ["global", "activate", "-sgit", "../foo.git"]); 27 schedulePub(args: ["global", "activate", "-sgit", "../foo.git"]);
29 28
30 var path = canonicalize(p.join(sandboxDir, "foo"));
31 schedulePub(args: ["global", "activate", "foo"], output: """ 29 schedulePub(args: ["global", "activate", "foo"], output: """
32 Package foo is currently active from Git repository "../foo.git". 30 Package foo is currently active from Git repository "../foo.git".
33 Resolving dependencies... 31 Resolving dependencies...
34 + foo 2.0.0 32 + foo 2.0.0
35 Downloading foo 2.0.0... 33 Downloading foo 2.0.0...
36 Precompiling executables... 34 Precompiling executables...
37 Loading source assets... 35 Loading source assets...
38 Precompiled foo:foo. 36 Precompiled foo:foo.
39 Activated foo 2.0.0."""); 37 Activated foo 2.0.0.""");
40 38
41 // Should now run the hosted one. 39 // Should now run the hosted one.
42 var pub = pubRun(global: true, args: ["foo"]); 40 var pub = pubRun(global: true, args: ["foo"]);
43 pub.stdout.expect("hosted"); 41 pub.stdout.expect("hosted");
44 pub.shouldExit(); 42 pub.shouldExit();
45 }); 43 });
46 } 44 }
OLDNEW
« no previous file with comments | « test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart ('k') | test/global/activate/outdated_binstub_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698