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

Unified Diff: pkg/args/test/usage_test.dart

Issue 203273013: Ignore hidden options when calculating usage columns. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « pkg/args/pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/args/test/usage_test.dart
diff --git a/pkg/args/test/usage_test.dart b/pkg/args/test/usage_test.dart
index ddd223c904b41f5d4197fb77634c98f0f920839a..77d66a83153c630248e6104d56547f7cc6d5e09f 100644
--- a/pkg/args/test/usage_test.dart
+++ b/pkg/args/test/usage_test.dart
@@ -177,8 +177,8 @@ void main() {
validateUsage(parser,
'''
- --first The first option
- --third The third option
+ --first The first option
+ --third The third option
''');
});
@@ -191,8 +191,22 @@ void main() {
validateUsage(parser,
'''
- --[no-]first The first flag
- --[no-]third The third flag
+ --[no-]first The first flag
+ --[no-]third The third flag
+ ''');
+ });
+
+ test("hidden options don't affect spacing", () {
+ var parser = new ArgParser();
+ parser.addFlag('first', help: 'The first flag');
+ parser.addFlag('second-very-long-option', hide: true);
+ parser.addFlag('third', help: 'The third flag');
+
+
+ validateUsage(parser,
+ '''
+ --[no-]first The first flag
+ --[no-]third The third flag
''');
});
});
« no previous file with comments | « pkg/args/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698