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

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

Issue 11819068: Add command support to args. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix a couple of type annotations. Created 7 years, 11 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 | « pkg/args/test/command_test.dart ('k') | pkg/args/test/usage_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/args/test/parse_test.dart
diff --git a/pkg/args/test/parse_test.dart b/pkg/args/test/parse_test.dart
index ab1d1306f8db81e5749ce59be81f6d7a7b2a9ff9..715c2269218537157fff9a758ef37005905de3cc 100644
--- a/pkg/args/test/parse_test.dart
+++ b/pkg/args/test/parse_test.dart
@@ -2,13 +2,23 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library args_test;
+library parse_test;
import 'package:unittest/unittest.dart';
import 'package:args/args.dart';
main() {
group('ArgParser.parse()', () {
+ test('does not destructively modify the argument list', () {
+ var parser = new ArgParser();
+ parser.addFlag('verbose');
+
+ var args = ['--verbose'];
+ var results = parser.parse(args);
+ expect(args, equals(['--verbose']));
+ expect(results['verbose'], isTrue);
+ });
+
group('flags', () {
test('are true if present', () {
var parser = new ArgParser();
« no previous file with comments | « pkg/args/test/command_test.dart ('k') | pkg/args/test/usage_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698