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

Unified Diff: tests/corelib/uri_test.dart

Issue 344803002: Fix bug in gen-delims table. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also fix lookup function. Created 6 years, 6 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 | « sdk/lib/core/uri.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/uri_test.dart
diff --git a/tests/corelib/uri_test.dart b/tests/corelib/uri_test.dart
index 071f9ab2fd76b10f8e40a0ad1ca8982bd8da3b0e..75466eea4484350c7e2d7723888c825d1104170c 100644
--- a/tests/corelib/uri_test.dart
+++ b/tests/corelib/uri_test.dart
@@ -221,6 +221,7 @@ void testInvalidUrls() {
"\xe7", "%C3%A7", // Arbitrary non-ASCII letter
" ", "%20", // Space, not allowed anywhere.
'"', "%22", // Quote, not allowed anywhere
+ "<>", "%3C%3E", // Less/greater-than, not allowed anywhere.
"\x7f", "%7F", // DEL, not allowed anywhere
"\xdf", "%C3%9F", // German lower-case scharf-S.
// Becomes ASCII when upper-cased.
@@ -261,8 +262,17 @@ void testInvalidUrls() {
checkInvalid("s://:/");
// @ not allowed in scheme.
checkInvalid("s@://x:9/x?x#x");
+ // ] not allowed alone in host.
+ checkInvalid("s://xx]/");
+ // ] not allowed anywhere except in host.
+ checkInvalid("s://xx/]");
+ checkInvalid("s://xx/?]");
+ checkInvalid("s://xx/#]");
+ checkInvalid("s:/]");
+ checkInvalid("s:/?]");
+ checkInvalid("s:/#]");
// IPv6 must be enclosed in [ and ] for Uri.parse.
- // It is allowed un-enclosed as argument to Uri(hist: ) because we don't
+ // It is allowed un-enclosed as argument to `Uri(host:...)` because we don't
// need to delimit.
checkInvalid("s://ffff::ffff:1234/");
}
« no previous file with comments | « sdk/lib/core/uri.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698