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

Unified Diff: sdk/lib/_internal/pub/test/global/binstubs/removes_when_deactivated_test.dart

Issue 566093003: Create binstubs for executables when activating a package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise! Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/test/global/binstubs/removes_when_deactivated_test.dart
diff --git a/sdk/lib/_internal/pub/test/global/activate/removes_old_lockfile_test.dart b/sdk/lib/_internal/pub/test/global/binstubs/removes_when_deactivated_test.dart
similarity index 50%
copy from sdk/lib/_internal/pub/test/global/activate/removes_old_lockfile_test.dart
copy to sdk/lib/_internal/pub/test/global/binstubs/removes_when_deactivated_test.dart
index 8816bcd63ceb71ee8de9295ea874ad7e7c71fa0c..3a8e149c588a0abb056a3d4091105dfc803f9e82 100644
--- a/sdk/lib/_internal/pub/test/global/activate/removes_old_lockfile_test.dart
+++ b/sdk/lib/_internal/pub/test/global/binstubs/removes_when_deactivated_test.dart
@@ -9,24 +9,28 @@ import '../../test_pub.dart';
main() {
initConfig();
- integration('removes the 1.6-style lockfile', () {
+ integration("removes binstubs when the package is deactivated", () {
servePackages((builder) {
- builder.serve("foo", "1.0.0");
+ builder.serve("foo", "1.0.0", pubspec: {
+ "executables": {
+ "one": null,
+ "two": null
+ }
+ }, contents: [
+ d.dir("bin", [
+ d.file("one.dart", "main(args) => print('one');"),
+ d.file("two.dart", "main(args) => print('two');")
+ ])
+ ]);
});
- d.dir(cachePath, [
- d.dir('global_packages', [
- d.file('foo.lock', 'packages: {foo: {description: foo, source: hosted, '
- 'version: "1.0.0"}}}')
- ])
- ]).create();
-
schedulePub(args: ["global", "activate", "foo"]);
+ schedulePub(args: ["global", "deactivate", "foo"]);
d.dir(cachePath, [
- d.dir('global_packages', [
- d.nothing('foo.lock'),
- d.dir('foo', [d.matcherFile('pubspec.lock', contains('1.0.0'))])
+ d.dir("bin", [
+ d.nothing("one"),
+ d.nothing("two")
])
]).validate();
});

Powered by Google App Engine
This is Rietveld 408576698