Index: tests/corelib/data_uri_test.dart |
diff --git a/tests/corelib/data_uri_test.dart b/tests/corelib/data_uri_test.dart |
index 1a21be1fde41e9d2b2064d3f5c4c9c0712a7c1a0..41f229085d143e2f86ab26cc165053e5b0aa516d 100644 |
--- a/tests/corelib/data_uri_test.dart |
+++ b/tests/corelib/data_uri_test.dart |
@@ -18,6 +18,13 @@ main() { |
testRoundTrip("blåbærgrød", UTF8); |
testRoundTrip("blåbærgrød", LATIN1); |
+ testUriEquals("data:,abc?d#e"); |
+ testUriEquals("DATA:,ABC?D#E"); |
+ testUriEquals("data:,a%20bc?d#e"); |
+ testUriEquals("DATA:,A%20BC?D#E"); |
+ testUriEquals("data:,a%62c?d#e"); |
+ testUriEquals("DATA:,A%42C?D#E"); |
+ |
testUtf8Encoding("\u1000\uffff"); |
testBytes(); |
testInvalidCharacters(); |
@@ -250,3 +257,11 @@ expectUriEquals(Uri expect, Uri actual) { |
Expect.equals(expect.hasFragment, actual.hasFragment, "hasFragment"); |
Expect.equals(expect.fragment, actual.fragment, "fragment"); |
} |
+ |
+void testUriEquals(String uriText) { |
+ var data = UriData.parse(uriText); |
+ var uri = Uri.parse(uriText); |
+ Expect.equals(data.uri, uri); |
+ Expect.equals(data.toString(), uri.data.toString()); |
+ Expect.equals(data.toString(), uri.toString()); |
+} |