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

Unified Diff: sdk/lib/_internal/pub/test/pub_test.dart

Issue 15444003: Use args' command support for pub commands. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Initialize command args in constructor. Created 7 years, 7 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
« no previous file with comments | « sdk/lib/_internal/pub/test/pub_cache_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/pub_test.dart
diff --git a/sdk/lib/_internal/pub/test/pub_test.dart b/sdk/lib/_internal/pub/test/pub_test.dart
index ba97da54ecd3438697a9affd8c1e7e4f002452e9..949f4371add1701bae02865a6fbd13e977873089 100644
--- a/sdk/lib/_internal/pub/test/pub_test.dart
+++ b/sdk/lib/_internal/pub/test/pub_test.dart
@@ -61,6 +61,28 @@ main() {
schedulePub(args: ['-h'], output: USAGE_STRING);
});
+ integration('running pub with --help after command shows command usage', () {
+ schedulePub(args: ['install', '--help'],
+ output: '''
+ Install the current package's dependencies.
+
+ Usage: pub install
+ -h, --help Print usage information for this command.
+ --[no-]offline Use cached packages instead of accessing the network.
+ ''');
+ });
+
+ integration('running pub with -h after command shows command usage', () {
+ schedulePub(args: ['install', '-h'],
+ output: '''
+ Install the current package's dependencies.
+
+ Usage: pub install
+ -h, --help Print usage information for this command.
+ --[no-]offline Use cached packages instead of accessing the network.
+ ''');
+ });
+
integration('running pub with just --version displays version', () {
schedulePub(args: ['--version'], output: VERSION_STRING);
});
@@ -89,7 +111,7 @@ main() {
schedulePub(args: ['version', '--blorf'],
error: '''
Could not find an option named "blorf".
- Use "pub help" for more information.
+ Run "pub help" to see available options.
''',
exitCode: 64);
});
@@ -101,7 +123,8 @@ main() {
Install the current package's dependencies.
Usage: pub install
- --[no-]offline Use cached packages instead of accessing the network.
+ -h, --help Print usage information for this command.
+ --[no-]offline Use cached packages instead of accessing the network.
''');
});
@@ -111,6 +134,7 @@ main() {
Publish the current package to pub.dartlang.org.
Usage: pub publish [options]
+ -h, --help Print usage information for this command.
-n, --dry-run Validate but do not publish the package.
-f, --force Publish without confirmation if there are no errors.
--server The package server to which to upload this package.
« no previous file with comments | « sdk/lib/_internal/pub/test/pub_cache_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698