| Index: pkg/path/test/windows_test.dart
|
| diff --git a/pkg/path/test/windows_test.dart b/pkg/path/test/windows_test.dart
|
| index d19466356ad8465c187c283cd98d12034504da42..7c16e31928a92e07dc574880f21743c926675f6e 100644
|
| --- a/pkg/path/test/windows_test.dart
|
| +++ b/pkg/path/test/windows_test.dart
|
| @@ -640,4 +640,34 @@ main() {
|
| expect(context.toUri(r'_{_}_`_^_ _"_%_'),
|
| Uri.parse('_%7B_%7D_%60_%5E_%20_%22_%25_'));
|
| });
|
| +
|
| + group('prettyUri', () {
|
| + test('with a file: URI', () {
|
| + expect(context.prettyUri('file:///C:/root/path/a/b'), r'a\b');
|
| + expect(context.prettyUri('file:///C:/root/path/a/../b'), r'b');
|
| + expect(context.prettyUri('file:///C:/other/path/a/b'),
|
| + r'C:\other\path\a\b');
|
| + expect(context.prettyUri('file:///D:/root/path/a/b'),
|
| + r'D:\root\path\a\b');
|
| + expect(context.prettyUri('file:///C:/root/other'),
|
| + r'..\other');
|
| + });
|
| +
|
| + test('with an http: URI', () {
|
| + expect(context.prettyUri('http://dartlang.org/a/b'),
|
| + 'http://dartlang.org/a/b');
|
| + });
|
| +
|
| + test('with a relative URI', () {
|
| + expect(context.prettyUri('a/b'), r'a\b');
|
| + });
|
| +
|
| + test('with a root-relative URI', () {
|
| + expect(context.prettyUri('/D:/a/b'), r'D:\a\b');
|
| + });
|
| +
|
| + test('with a Uri object', () {
|
| + expect(context.prettyUri(Uri.parse('a/b')), r'a\b');
|
| + });
|
| + });
|
| }
|
|
|