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

Unified Diff: test/args_test.dart

Issue 975463004: Parse comma-separated multiple values. (Closed) Base URL: git@github.com:dart-lang/args@master
Patch Set: Code review changes Created 5 years, 10 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
Index: test/args_test.dart
diff --git a/test/args_test.dart b/test/args_test.dart
index 4c23ba5338455139dbd18a1c25492f448d41d0c4..b22d0c95338f7bc2528d2fe607e5affd9a42cebc 100644
--- a/test/args_test.dart
+++ b/test/args_test.dart
@@ -109,6 +109,13 @@ void main() {
}
});
+ test('throws ArgumentError if splitCommas is passed with allowMultiple: '
+ 'false', () {
+ var parser = new ArgParser();
+ throwsIllegalArg(() => parser.addOption('flummox', splitCommas: true));
+ throwsIllegalArg(() => parser.addOption('flummox', splitCommas: false));
+ });
+
test('accepts valid option names', () {
var parser = new ArgParser();
« lib/src/arg_parser.dart ('K') | « pubspec.yaml ('k') | test/parse_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698