Index: pkg/pathos/test/pathos_url_test.dart |
diff --git a/pkg/pathos/test/pathos_url_test.dart b/pkg/pathos/test/pathos_url_test.dart |
index b8c100f27afe4613a573dadec3824b86b2ee1f69..ff1af8621bcb757678f57378d5aab523e0573642 100644 |
--- a/pkg/pathos/test/pathos_url_test.dart |
+++ b/pkg/pathos/test/pathos_url_test.dart |
@@ -625,4 +625,29 @@ main() { |
expect(builder.withoutExtension('a/b.c/'), 'a/b/'); |
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'); |
+ expect(builder.fromUri(Uri.parse('http://dartlang.org/path/to/foo/')), |
+ 'http://dartlang.org/path/to/foo/'); |
+ expect(builder.fromUri(Uri.parse('file:///path/to/foo')), |
+ 'file:///path/to/foo'); |
+ 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'); |
+ }); |
+ |
+ test('toUri', () { |
+ expect(builder.toUri('http://dartlang.org/path/to/foo'), |
+ Uri.parse('http://dartlang.org/path/to/foo')); |
+ expect(builder.toUri('http://dartlang.org/path/to/foo/'), |
+ Uri.parse('http://dartlang.org/path/to/foo/')); |
+ expect(builder.toUri('file:///path/to/foo'), |
+ Uri.parse('file:///path/to/foo')); |
+ 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')); |
+ }); |
} |