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

Unified Diff: sdk/lib/_internal/pub/test/global/run/runs_script_test.dart

Issue 354763006: Add a "pub global run" command. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise! Created 6 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/test/global/run/runs_script_test.dart
diff --git a/sdk/lib/_internal/pub/test/global/deactivate/deactivate_package_test.dart b/sdk/lib/_internal/pub/test/global/run/runs_script_test.dart
similarity index 63%
copy from sdk/lib/_internal/pub/test/global/deactivate/deactivate_package_test.dart
copy to sdk/lib/_internal/pub/test/global/run/runs_script_test.dart
index f6e9056422b46b34bed4048316f6f2f94124074d..217758f26c34cecdc342d1cf6ecf6a42178e0d30 100644
--- a/sdk/lib/_internal/pub/test/global/deactivate/deactivate_package_test.dart
+++ b/sdk/lib/_internal/pub/test/global/run/runs_script_test.dart
@@ -2,22 +2,25 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'package:scheduled_test/scheduled_test.dart';
-
import '../../../lib/src/exit_codes.dart' as exit_codes;
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
main() {
initConfig();
- integration('deactivates an active package', () {
+ integration('runs a script in an activated package', () {
servePackages([
packageMap("foo", "1.0.0")
+ ], contents: [
+ d.dir("bin", [
+ d.file("script.dart", "main(args) => print('ok');")
+ ])
]);
schedulePub(args: ["global", "activate", "foo"]);
- schedulePub(args: ["global", "deactivate", "foo"],
- output: "Deactivated package foo 1.0.0.");
+ var pub = pubRun(global: true, args: ["foo", "script"]);
+ pub.stdout.expect("ok");
+ pub.shouldExit();
});
}

Powered by Google App Engine
This is Rietveld 408576698