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

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

Issue 23913009: Add support for hidden options to pkg/args. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« pkg/args/lib/args.dart ('K') | « pkg/args/lib/src/usage.dart ('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 6068f321f315d678daa8749f6a400cbb8c65bbc0..364e3f892050c2bed48591122e9d4cec131cf277 100644
--- a/pkg/args/test/usage_test.dart
+++ b/pkg/args/test/usage_test.dart
@@ -167,6 +167,20 @@ main() {
[spades] Swords of a soldier
''');
});
+
+ test("hidden flags don't appear in the help", () {
+ var parser = new ArgParser();
+ parser.addOption('first', help: 'The first option');
+ parser.addOption('second', isHidden: true);
+ parser.addOption('third', help: 'The third option');
+
+
+ validateUsage(parser,
+ '''
+ --first The first option
+ --third The third option
+ ''');
+ });
});
}
« pkg/args/lib/args.dart ('K') | « pkg/args/lib/src/usage.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698