Chromium Code Reviews| Index: pkg/path/test/posix_test.dart |
| diff --git a/pkg/path/test/posix_test.dart b/pkg/path/test/posix_test.dart |
| index 83a473e78087dc3119151529329c5ccab499b3fa..72cfaf69f6470139d11980cd70e795e0bb6e33db 100644 |
| --- a/pkg/path/test/posix_test.dart |
| +++ b/pkg/path/test/posix_test.dart |
| @@ -474,19 +474,25 @@ main() { |
| expect(context.withoutExtension('a/b.c//'), 'a/b//'); |
| }); |
| - test('fromUri', () { |
| - expect(context.fromUri(Uri.parse('file:///path/to/foo')), '/path/to/foo'); |
| - expect(context.fromUri(Uri.parse('file:///path/to/foo/')), '/path/to/foo/'); |
| - expect(context.fromUri(Uri.parse('file:///')), '/'); |
| - expect(context.fromUri(Uri.parse('foo/bar')), 'foo/bar'); |
| - expect(context.fromUri(Uri.parse('/path/to/foo')), '/path/to/foo'); |
| - expect(context.fromUri(Uri.parse('///path/to/foo')), '/path/to/foo'); |
| - expect(context.fromUri(Uri.parse('file:///path/to/foo%23bar')), |
| - '/path/to/foo#bar'); |
| - expect(context.fromUri(Uri.parse('_%7B_%7D_%60_%5E_%20_%22_%25_')), |
| - r'_{_}_`_^_ _"_%_'); |
| - expect(() => context.fromUri(Uri.parse('http://dartlang.org')), |
| - throwsArgumentError); |
| + group('fromUri', () { |
| + test('with a URI', () { |
| + expect(context.fromUri(Uri.parse('file:///path/to/foo')), '/path/to/foo'); |
| + expect(context.fromUri(Uri.parse('file:///path/to/foo/')), '/path/to/foo/'); |
|
Bob Nystrom
2014/03/18 20:31:09
Long line.
nweiz
2014/03/18 22:02:19
Done.
|
| + expect(context.fromUri(Uri.parse('file:///')), '/'); |
| + expect(context.fromUri(Uri.parse('foo/bar')), 'foo/bar'); |
| + expect(context.fromUri(Uri.parse('/path/to/foo')), '/path/to/foo'); |
| + expect(context.fromUri(Uri.parse('///path/to/foo')), '/path/to/foo'); |
| + expect(context.fromUri(Uri.parse('file:///path/to/foo%23bar')), |
| + '/path/to/foo#bar'); |
| + expect(context.fromUri(Uri.parse('_%7B_%7D_%60_%5E_%20_%22_%25_')), |
| + r'_{_}_`_^_ _"_%_'); |
| + expect(() => context.fromUri(Uri.parse('http://dartlang.org')), |
| + throwsArgumentError); |
| + }); |
| + |
| + test('with a string', () { |
| + expect(context.fromUri('file:///path/to/foo'), '/path/to/foo'); |
| + }); |
| }); |
| test('toUri', () { |