| OLD | NEW |
| (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", [d.pubspec({ | |
| 15 "name": "foo", | |
| 16 "executables": { | |
| 17 "foo": "foo", | |
| 18 "collide1": "foo", | |
| 19 "collide2": "foo" | |
| 20 } | |
| 21 }), | |
| 22 d.dir("bin", [d.file("foo.dart", "main() => print('ok');")])]).create(
); | |
| 23 | |
| 24 d.dir("bar", [d.pubspec({ | |
| 25 "name": "bar", | |
| 26 "executables": { | |
| 27 "bar": "bar", | |
| 28 "collide1": "bar", | |
| 29 "collide2": "bar" | |
| 30 } | |
| 31 }), | |
| 32 d.dir("bin", [d.file("bar.dart", "main() => print('ok');")])]).create(
); | |
| 33 | |
| 34 schedulePub(args: ["global", "activate", "-spath", "../foo"]); | |
| 35 | |
| 36 var pub = startPub(args: ["global", "activate", "-spath", "../bar"]); | |
| 37 pub.stdout.expect(consumeThrough("Installed executable bar.")); | |
| 38 pub.stderr.expect("Executable collide1 was already installed from foo."); | |
| 39 pub.stderr.expect("Executable collide2 was already installed from foo."); | |
| 40 pub.stderr.expect( | |
| 41 "Deactivate the other package(s) or activate bar using " "--overwrite.")
; | |
| 42 pub.shouldExit(); | |
| 43 | |
| 44 d.dir( | |
| 45 cachePath, | |
| 46 [ | |
| 47 d.dir( | |
| 48 "bin", | |
| 49 [ | |
| 50 d.matcherFile(binStubName("foo"), contains("foo:foo")), | |
| 51 d.matcherFile(binStubName("bar"), contains("bar:bar")), | |
| 52 d.matcherFile(binStubName("collide1"), contains("foo:foo")), | |
| 53 d.matcherFile(binStubName("collide2"), contains("foo:foo"))]
)]).validate(); | |
| 54 }); | |
| 55 } | |
| OLD | NEW |