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

Unified Diff: pkg/path/test/url_test.dart

Issue 20364002: Remove API documentation from path README. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add doc link to pubspec. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/path/test/posix_test.dart ('k') | pkg/path/test/windows_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/path/test/url_test.dart
diff --git a/pkg/path/test/url_test.dart b/pkg/path/test/url_test.dart
index 1cd256d13481a22ca7491cb5a6197d4a097bfe9d..d72f411bf42c18df3a48369c47abafaee7f2d441 100644
--- a/pkg/path/test/url_test.dart
+++ b/pkg/path/test/url_test.dart
@@ -665,7 +665,6 @@ main() {
expect(builder.withoutExtension('a/b.c//'), 'a/b//');
});
-
test('fromUri', () {
expect(builder.fromUri(Uri.parse('http://dartlang.org/path/to/foo')),
'http://dartlang.org/path/to/foo');
@@ -676,6 +675,10 @@ main() {
expect(builder.fromUri(Uri.parse('foo/bar')), 'foo/bar');
expect(builder.fromUri(Uri.parse('http://dartlang.org/path/to/foo%23bar')),
'http://dartlang.org/path/to/foo%23bar');
+ // Since the resulting "path" is also a URL, special characters should
+ // remain percent-encoded in the result.
+ expect(builder.fromUri(Uri.parse('_%7B_%7D_%60_%5E_%20_%22_%25_')),
+ r'_%7B_%7D_%60_%5E_%20_%22_%25_');
});
test('toUri', () {
@@ -688,5 +691,11 @@ main() {
expect(builder.toUri('foo/bar'), Uri.parse('foo/bar'));
expect(builder.toUri('http://dartlang.org/path/to/foo%23bar'),
Uri.parse('http://dartlang.org/path/to/foo%23bar'));
+ // Since the input path is also a URI, special characters should already
+ // be percent encoded there too.
+ expect(builder.toUri(r'http://foo.com/_%7B_%7D_%60_%5E_%20_%22_%25_'),
+ Uri.parse('http://foo.com/_%7B_%7D_%60_%5E_%20_%22_%25_'));
+ expect(builder.toUri(r'_%7B_%7D_%60_%5E_%20_%22_%25_'),
+ Uri.parse('_%7B_%7D_%60_%5E_%20_%22_%25_'));
});
}
« no previous file with comments | « pkg/path/test/posix_test.dart ('k') | pkg/path/test/windows_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698