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

Unified Diff: test/command_runner_test.dart

Issue 1603063004: Don't truncate multi-line command descriptions. (Closed) Base URL: git@github.com:dart-lang/args@master
Patch Set: Created 4 years, 11 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 | « pubspec.yaml ('k') | test/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/command_runner_test.dart
diff --git a/test/command_runner_test.dart b/test/command_runner_test.dart
index f3a74a0bcc617eb4602050a6427e9985f94861aa..bccc7b318d6ce6b9f631ec52be475eaff5ea0ab3 100644
--- a/test/command_runner_test.dart
+++ b/test/command_runner_test.dart
@@ -54,6 +54,25 @@ Available commands:
Run "test help <command>" for more information about a command."""));
});
+ test("supports newlines in command descriptions", () {
+ runner.addCommand(new MultilineCommand());
+
+ expect(runner.usage, equals("""
+A test command runner.
+
+Usage: test <command> [arguments]
+
+Global options:
+-h, --help Print this usage information.
+
+Available commands:
+ help Display help information for test.
+ multiline Multi
+ line.
+
+Run "test help <command>" for more information about a command."""));
+ });
+
test("contains custom options", () {
runner.argParser.addFlag("foo", help: "Do something.");
« no previous file with comments | « pubspec.yaml ('k') | test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698