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

Side by Side Diff: tests/corelib/uri_file_test.dart

Issue 167703010: Write custom URI-parser, to avoid using regexp. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 testFileUri() { 7 testFileUri() {
8 final unsupported = new UnsupportedError(""); 8 final unsupported = new UnsupportedError("");
9 9
10 var tests = [ 10 var tests = [
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } else { 251 } else {
252 Expect.throws(() => uri.toFilePath(windows: true), 252 Expect.throws(() => uri.toFilePath(windows: true),
253 (e) => e is UnsupportedError); 253 (e) => e is UnsupportedError);
254 } 254 }
255 } 255 }
256 256
257 check("file:///path?query"); 257 check("file:///path?query");
258 check("file:///path#fragment"); 258 check("file:///path#fragment");
259 check("file:///path?query#fragment"); 259 check("file:///path?query#fragment");
260 check("file://host/path", windowsOk: true); 260 check("file://host/path", windowsOk: true);
261 check("file://user@password:host/path"); 261 check("file://user:password@host/path", windowsOk: true);
Søren Gjesse 2014/02/24 09:12:41 Please add the previous URI to a failing test some
Anders Johnsen 2014/02/24 12:44:33 Done.
Lasse Reichstein Nielsen 2014/02/24 13:02:27 We need tests. Lots of tests. Something like: fo
Anders Johnsen 2014/02/24 14:26:49 Done.
262 } 262 }
263 263
264 main() { 264 main() {
265 testFileUri(); 265 testFileUri();
266 testFileUriWindowsSlash(); 266 testFileUriWindowsSlash();
267 testFileUriDriveLetter(); 267 testFileUriDriveLetter();
268 testFileUriWindowsWin32Namespace(); 268 testFileUriWindowsWin32Namespace();
269 testFileUriResolve(); 269 testFileUriResolve();
270 testFileUriIllegalCharacters(); 270 testFileUriIllegalCharacters();
271 testFileUriIllegalDriveLetter(); 271 testFileUriIllegalDriveLetter();
272 testAdditionalComponents(); 272 testAdditionalComponents();
273 } 273 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698