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

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: Code review changes 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
« 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/args_test.dart
diff --git a/pkg/args/test/args_test.dart b/pkg/args/test/args_test.dart
index 6792c95e68a5b67563c08ef28334287207b937f1..77c23c329311e5ac308400b03def18da6767226c 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('.arguments returns the original argument list', () {
+ var parser = new ArgParser();
+ parser.addFlag('foo');
+
+ var results = parser.parse(['--foo']);
+ expect(results.arguments, equals(['--foo']));
+ });
+
group('.wasParsed()', () {
test('throws if the name is not an option', () {
var results = new ArgParser().parse([]);
« 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