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

Side by Side Diff: sdk/lib/_internal/pub/test/global/binstubs/name_collision_test.dart

Issue 1165473002: Start pulling pub from its own repo. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review changes Created 5 years, 6 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:scheduled_test/scheduled_stream.dart';
6 import 'package:scheduled_test/scheduled_test.dart';
7
8 import '../../descriptor.dart' as d;
9 import '../../test_pub.dart';
10
11 main() {
12 initConfig();
13 integration("does not overwrite an existing binstub", () {
14 d.dir("foo", [
15 d.pubspec({
16 "name": "foo",
17 "executables": {
18 "foo": "foo",
19 "collide1": "foo",
20 "collide2": "foo"
21 }
22 }),
23 d.dir("bin", [
24 d.file("foo.dart", "main() => print('ok');")
25 ])
26 ]).create();
27
28 d.dir("bar", [
29 d.pubspec({
30 "name": "bar",
31 "executables": {
32 "bar": "bar",
33 "collide1": "bar",
34 "collide2": "bar"
35 }
36 }),
37 d.dir("bin", [
38 d.file("bar.dart", "main() => print('ok');")
39 ])
40 ]).create();
41
42 schedulePub(args: ["global", "activate", "-spath", "../foo"]);
43
44 var pub = startPub(args: ["global", "activate", "-spath", "../bar"]);
45 pub.stdout.expect(consumeThrough("Installed executable bar."));
46 pub.stderr.expect("Executable collide1 was already installed from foo.");
47 pub.stderr.expect("Executable collide2 was already installed from foo.");
48 pub.stderr.expect("Deactivate the other package(s) or activate bar using "
49 "--overwrite.");
50 pub.shouldExit();
51
52 d.dir(cachePath, [
53 d.dir("bin", [
54 d.matcherFile(binStubName("foo"), contains("foo:foo")),
55 d.matcherFile(binStubName("bar"), contains("bar:bar")),
56 d.matcherFile(binStubName("collide1"), contains("foo:foo")),
57 d.matcherFile(binStubName("collide2"), contains("foo:foo"))
58 ])
59 ]).validate();
60 });
61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698