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

Unified Diff: tests/lib/args/args_test.dart

Issue 10854133: Add support for upper case in arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | « lib/args/args.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/args/args_test.dart
===================================================================
--- tests/lib/args/args_test.dart (revision 10584)
+++ tests/lib/args/args_test.dart (working copy)
@@ -407,6 +407,15 @@
expect(results['meow'], equals('kitty'));
expect(results.rest, orderedEquals(['--meow']));
});
+
+ test('handles options with case-sensitivity', () {
+ var parser = new ArgParser();
+ parser.addFlag('recurse', defaultsTo: false, abbr:'R');
+ var results = parser.parse(['-R']);
+ expect(results['recurse'], isTrue);
+ expect(results.rest, [ ]);
+ throwsFormat(parser, ['-r']);
+ });
});
});
« no previous file with comments | « lib/args/args.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698