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

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

Issue 82213002: Add a [hide] argument to [ArgParser.addFlag]. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 27b038946ba912911fface2f0288fab911527cfa..f24b872a3cecf0c7de239b6ab8eb3985cfb3fc92 100644
--- a/pkg/args/test/usage_test.dart
+++ b/pkg/args/test/usage_test.dart
@@ -168,7 +168,7 @@ main() {
''');
});
- test("hidden flags don't appear in the help", () {
+ test("hidden options don't appear in the help", () {
var parser = new ArgParser();
parser.addOption('first', help: 'The first option');
parser.addOption('second', hide: true);
@@ -181,6 +181,20 @@ main() {
--third The third option
''');
});
+
+ test("hidden flags don't appear in the help", () {
+ var parser = new ArgParser();
+ parser.addFlag('first', help: 'The first flag');
+ parser.addFlag('second', 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