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

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

Issue 897593005: Adds a repeatable --url_mapping flag to dartanalyzer (Closed) Base URL: http://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/test/generated/all_the_rest_test.dart ('k') | runtime/tools/create_snapshot_bin.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/options_test.dart
===================================================================
--- pkg/analyzer/test/options_test.dart (revision 43787)
+++ pkg/analyzer/test/options_test.dart (working copy)
@@ -30,6 +30,8 @@
expect(options.sourceFiles, equals(['foo.dart']));
expect(options.warmPerf, isFalse);
expect(options.warningsAreFatal, isFalse);
+ expect(options.customUrlMappings, isNotNull);
+ expect(options.customUrlMappings.isEmpty, isTrue);
});
test('batch', () {
@@ -107,6 +109,17 @@
expect(options.warningsAreFatal, isTrue);
});
+ test('customUrlMappings', () {
+ 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'));
+ });
+
// test('notice unrecognized flags', () {
// CommandLineOptions options = new CommandLineOptions.parse(['--bar', '--baz',
// 'foo.dart']);
« no previous file with comments | « pkg/analyzer/test/generated/all_the_rest_test.dart ('k') | runtime/tools/create_snapshot_bin.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698