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

Unified Diff: sdk/lib/_internal/pub/test/global/run/nonexistent_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/nonexistent_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/nonexistent_script_test.dart
similarity index 57%
copy from sdk/lib/_internal/pub/test/global/deactivate/deactivate_package_test.dart
copy to sdk/lib/_internal/pub/test/global/run/nonexistent_script_test.dart
index f6e9056422b46b34bed4048316f6f2f94124074d..714b2228d6ec0afc2fb0dec978b8acb6b52a2ec4 100644
--- a/sdk/lib/_internal/pub/test/global/deactivate/deactivate_package_test.dart
+++ b/sdk/lib/_internal/pub/test/global/run/nonexistent_script_test.dart
@@ -2,7 +2,7 @@
// 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 'package:path/path.dart' as p;
import '../../../lib/src/exit_codes.dart' as exit_codes;
import '../../descriptor.dart' as d;
@@ -10,14 +10,13 @@ import '../../test_pub.dart';
main() {
initConfig();
- integration('deactivates an active package', () {
- servePackages([
- packageMap("foo", "1.0.0")
- ]);
+ integration('errors if the script does not exist.', () {
+ servePackages([packageMap("foo", "1.0.0")]);
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.stderr.expect("Could not find ${p.join("bin", "script.dart")}.");
+ pub.shouldExit(exit_codes.NO_INPUT);
});
}

Powered by Google App Engine
This is Rietveld 408576698