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

Side by Side Diff: pkg/polymer/test/build/linter_test.dart

Issue 79513002: Fix resolution of packages in pub-build to allow '../../packages/foo/bar' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library polymer.test.linter_test; 5 library polymer.test.linter_test;
6 6
7 import 'package:polymer/src/build/common.dart'; 7 import 'package:polymer/src/build/common.dart';
8 import 'package:polymer/src/build/linter.dart'; 8 import 'package:polymer/src/build/linter.dart';
9 import 'package:source_maps/span.dart'; 9 import 'package:source_maps/span.dart';
10 import 'package:unittest/compact_vm_config.dart'; 10 import 'package:unittest/compact_vm_config.dart';
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 'a|lib/test.html.messages': 150 'a|lib/test.html.messages':
151 'error: couldn\'t find imported asset "lib/b.html" in package ' 151 'error: couldn\'t find imported asset "lib/b.html" in package '
152 '"a". (lib/test.html 1 0)' 152 '"a". (lib/test.html 1 0)'
153 }); 153 });
154 154
155 _testLinter('other package', { 155 _testLinter('other package', {
156 'b|lib/b.html': '''<html> 156 'b|lib/b.html': '''<html>
157 <polymer-element name="x-a"></polymer-element> 157 <polymer-element name="x-a"></polymer-element>
158 </html>'''.replaceAll(' ', ''), 158 </html>'''.replaceAll(' ', ''),
159 'a|lib/test.html': '''<html> 159 'a|lib/test.html': '''<html>
160 <link rel="import" href="packages/b/b.html"> 160 <link rel="import" href="../../packages/b/b.html">
161 <polymer-element name="x-a"></polymer-element> 161 <polymer-element name="x-a"></polymer-element>
162 </html>'''.replaceAll(' ', ''), 162 </html>'''.replaceAll(' ', ''),
163 }, { 163 }, {
164 'a|lib/test.html.messages': 164 'a|lib/test.html.messages':
165 'warning: duplicate definition for custom tag "x-a". ' 165 'warning: duplicate definition for custom tag "x-a". '
166 '(package:b/b.html 1 0)\n' 166 '(package:b/b.html 1 0)\n'
167 'warning: duplicate definition for custom tag "x-a" ' 167 'warning: duplicate definition for custom tag "x-a" '
168 '(second definition). (lib/test.html 2 0)' 168 '(second definition). (lib/test.html 2 0)'
169 }); 169 });
170 }); 170 });
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 524
525 525
526 _testFormatter(String kind, String message, Span span) { 526 _testFormatter(String kind, String message, Span span) {
527 var formattedMessage = '$kind: $message'; 527 var formattedMessage = '$kind: $message';
528 if (span != null) { 528 if (span != null) {
529 formattedMessage = '$formattedMessage ' 529 formattedMessage = '$formattedMessage '
530 '(${span.sourceUrl} ${span.start.line} ${span.start.column})'; 530 '(${span.sourceUrl} ${span.start.line} ${span.start.column})';
531 } 531 }
532 return formattedMessage; 532 return formattedMessage;
533 } 533 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698