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

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

Issue 398193002: If ":" is omitted, use same name for package and script in pub global run. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Apply actual changes. Created 6 years, 5 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/implicit_executable_name_test.dart
diff --git a/sdk/lib/_internal/pub/test/global/run/runs_script_test.dart b/sdk/lib/_internal/pub/test/global/run/implicit_executable_name_test.dart
similarity index 72%
copy from sdk/lib/_internal/pub/test/global/run/runs_script_test.dart
copy to sdk/lib/_internal/pub/test/global/run/implicit_executable_name_test.dart
index 217758f26c34cecdc342d1cf6ecf6a42178e0d30..ad93bac7e2e8e346542b8c95f68b77347f1d4bd6 100644
--- a/sdk/lib/_internal/pub/test/global/run/runs_script_test.dart
+++ b/sdk/lib/_internal/pub/test/global/run/implicit_executable_name_test.dart
@@ -8,19 +8,19 @@ import '../../test_pub.dart';
main() {
initConfig();
- integration('runs a script in an activated package', () {
+ integration('defaults to the package name if the script is omitted', () {
servePackages([
packageMap("foo", "1.0.0")
], contents: [
d.dir("bin", [
- d.file("script.dart", "main(args) => print('ok');")
+ d.file("foo.dart", "main(args) => print('foo');")
])
]);
schedulePub(args: ["global", "activate", "foo"]);
- var pub = pubRun(global: true, args: ["foo", "script"]);
- pub.stdout.expect("ok");
+ var pub = pubRun(global: true, args: ["foo"]);
+ pub.stdout.expect("foo");
pub.shouldExit();
});
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/run.dart ('k') | sdk/lib/_internal/pub/test/global/run/missing_executable_arg_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698