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

Unified Diff: pkg/analyzer/test/options_test.dart

Issue 940093003: Add ignore-unrecognized-flags as an option to the command line options of analysis server (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « pkg/analyzer/lib/options.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/options_test.dart
diff --git a/pkg/analyzer/test/options_test.dart b/pkg/analyzer/test/options_test.dart
index dd6528335dcd133abdd12fefd89ccb79f578db0f..78365ac0913a65396f416d0abd8fdaaa8fcec620 100644
--- a/pkg/analyzer/test/options_test.dart
+++ b/pkg/analyzer/test/options_test.dart
@@ -6,6 +6,7 @@ library options_test;
import 'package:analyzer/options.dart';
import 'package:unittest/unittest.dart';
+import 'package:args/args.dart';
main() {
@@ -110,28 +111,38 @@ main() {
});
test('customUrlMappings', () {
- CommandLineOptions options = CommandLineOptions.parse([
- '--dart-sdk', '.',
- '--url-mapping', 'dart:dummy,/path/to/dummy.dart',
- 'foo.dart']);
+ CommandLineOptions options = CommandLineOptions.parse(
+ [
+ '--dart-sdk',
+ '.',
+ '--url-mapping',
+ 'dart:dummy,/path/to/dummy.dart',
+ 'foo.dart']);
expect(options.customUrlMappings, isNotNull);
expect(options.customUrlMappings.isEmpty, isFalse);
- expect(options.customUrlMappings['dart:dummy'],
- equals('/path/to/dummy.dart'));
+ expect(
+ options.customUrlMappings['dart:dummy'],
+ equals('/path/to/dummy.dart'));
});
// test('notice unrecognized flags', () {
-// CommandLineOptions options = new CommandLineOptions.parse(['--bar', '--baz',
+// CommandLineOptions options = CommandLineOptions.parse(['--bar', '--baz',
// 'foo.dart']);
// expect(options, isNull);
// });
-//
-// test('ignore unrecognized flags', () {
-// CommandLineOptions options = new CommandLineOptions.parse([
-// '--ignore_unrecognized_flags', '--bar', '--baz', 'foo.dart']);
-// expect(options, isNotNull);
-// expect(options.sourceFiles, equals(['foo.dart']));
-// });
+
+ test('ignore unrecognized flags', () {
+ CommandLineOptions options = CommandLineOptions.parse(
+ [
+ '--ignore-unrecognized-flags',
+ '--bar',
+ '--baz',
+ '--dart-sdk',
+ '.',
+ 'foo.dart']);
+ expect(options, isNotNull);
+ expect(options.sourceFiles, equals(['foo.dart']));
+ });
});
« no previous file with comments | « pkg/analyzer/lib/options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698