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

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

Issue 796593004: Add an ArgResults.original getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/src/arg_results.dart ('K') | « 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/args_test.dart
diff --git a/pkg/args/test/args_test.dart b/pkg/args/test/args_test.dart
index 6792c95e68a5b67563c08ef28334287207b937f1..c5c94f10de71500fb87ec9bbceedb87dc77d9c5a 100644
--- a/pkg/args/test/args_test.dart
+++ b/pkg/args/test/args_test.dart
@@ -228,6 +228,14 @@ void main() {
expect(() => results.rest.add('oops'), throwsUnsupportedError);
});
+ test('.original returns the original argument list', () {
+ var parser = new ArgParser();
+ parser.addFlag('foo');
+
+ var results = parser.parse(['--foo']);
+ expect(results.original, equals(['--foo']));
+ });
+
group('.wasParsed()', () {
test('throws if the name is not an option', () {
var results = new ArgParser().parse([]);
« pkg/args/lib/src/arg_results.dart ('K') | « pkg/args/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698