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

Unified Diff: test/command_runner_test.dart

Issue 1812923003: Add an explicit distinction between a command's description and summary. (Closed) Base URL: git@github.com:dart-lang/args@master
Patch Set: Created 4 years, 9 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 bccc7b318d6ce6b9f631ec52be475eaff5ea0ab3..9961e7dc84e1d6b4df165e65d5021c6e34d4e4c8 100644
--- a/test/command_runner_test.dart
+++ b/test/command_runner_test.dart
@@ -54,7 +54,7 @@ Available commands:
Run "test help <command>" for more information about a command."""));
});
- test("supports newlines in command descriptions", () {
+ test("truncates newlines in command descriptions by default", () {
runner.addCommand(new MultilineCommand());
expect(runner.usage, equals("""
@@ -68,6 +68,24 @@ Global options:
Available commands:
help Display help information for test.
multiline Multi
+
+Run "test help <command>" for more information about a command."""));
+ });
+
+ test("supports newlines in command summaries", () {
+ runner.addCommand(new MultilineSummaryCommand());
+
+ 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."""));
« 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