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

Side by Side Diff: pkg/watcher/test/utils.dart

Issue 18464006: Normalize paths when matching them. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 watcher.test.utils; 5 library watcher.test.utils;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 /// The expected path. 183 /// The expected path.
184 final String path; 184 final String path;
185 185
186 _ChangeMatcher(this.type, this.path); 186 _ChangeMatcher(this.type, this.path);
187 187
188 Description describe(Description description) { 188 Description describe(Description description) {
189 description.add("$type $path"); 189 description.add("$type $path");
190 } 190 }
191 191
192 bool matches(item, Map matchState) => 192 bool matches(item, Map matchState) =>
193 item is WatchEvent && item.type == type && item.path == path; 193 item is WatchEvent &&
194 item.type == type &&
195 p.normalize(item.path) == p.normalize(path);
194 } 196 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698