| 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:scheduled_test/scheduled_stream.dart'; | 5 import 'package:scheduled_test/scheduled_stream.dart'; |
| 6 import 'package:scheduled_test/scheduled_test.dart'; | 6 import 'package:scheduled_test/scheduled_test.dart'; |
| 7 | 7 |
| 8 import '../../descriptor.dart' as d; | 8 import '../../descriptor.dart' as d; |
| 9 import '../../test_pub.dart'; | 9 import '../../test_pub.dart'; |
| 10 import 'utils.dart'; |
| 10 | 11 |
| 11 main() { | 12 main() { |
| 12 initConfig(); | 13 initConfig(); |
| 13 integration("does not overwrite an existing binstub", () { | 14 integration("does not overwrite an existing binstub", () { |
| 14 d.dir("foo", [ | 15 d.dir("foo", [ |
| 15 d.pubspec({ | 16 d.pubspec({ |
| 16 "name": "foo", | 17 "name": "foo", |
| 17 "executables": { | 18 "executables": { |
| 18 "foo": "foo", | 19 "foo": "foo", |
| 19 "collide1": "foo", | 20 "collide1": "foo", |
| (...skipping 24 matching lines...) Expand all Loading... |
| 44 var pub = startPub(args: ["global", "activate", "-spath", "../bar"]); | 45 var pub = startPub(args: ["global", "activate", "-spath", "../bar"]); |
| 45 pub.stdout.expect(consumeThrough("Installed executable bar.")); | 46 pub.stdout.expect(consumeThrough("Installed executable bar.")); |
| 46 pub.stderr.expect("Executable collide1 was already installed from foo."); | 47 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("Executable collide2 was already installed from foo."); |
| 48 pub.stderr.expect("Deactivate the other package(s) or activate bar using " | 49 pub.stderr.expect("Deactivate the other package(s) or activate bar using " |
| 49 "--overwrite."); | 50 "--overwrite."); |
| 50 pub.shouldExit(); | 51 pub.shouldExit(); |
| 51 | 52 |
| 52 d.dir(cachePath, [ | 53 d.dir(cachePath, [ |
| 53 d.dir("bin", [ | 54 d.dir("bin", [ |
| 54 d.matcherFile("foo", contains("foo:foo")), | 55 d.matcherFile(binStubName("foo"), contains("foo:foo")), |
| 55 d.matcherFile("bar", contains("bar:bar")), | 56 d.matcherFile(binStubName("bar"), contains("bar:bar")), |
| 56 d.matcherFile("collide1", contains("foo:foo")), | 57 d.matcherFile(binStubName("collide1"), contains("foo:foo")), |
| 57 d.matcherFile("collide2", contains("foo:foo")) | 58 d.matcherFile(binStubName("collide2"), contains("foo:foo")) |
| 58 ]) | 59 ]) |
| 59 ]).validate(); | 60 ]).validate(); |
| 60 }); | 61 }); |
| 61 } | 62 } |
| OLD | NEW |