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

Side by Side Diff: test/windows_test.dart

Issue 1225373003: Fix path.toUri for relative paths. (Closed) Base URL: git@github.com:dart-lang/path@master
Patch Set: merge Created 5 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 unified diff | Download patch
« no previous file with comments | « test/url_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library path.test.windows_test; 5 library path.test.windows_test;
6 6
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'package:path/path.dart' as path; 8 import 'package:path/path.dart' as path;
9 9
10 import 'utils.dart'; 10 import 'utils.dart';
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 test('with a string', () { 622 test('with a string', () {
623 expect(context.fromUri('file:///C:/path/to/foo'), r'C:\path\to\foo'); 623 expect(context.fromUri('file:///C:/path/to/foo'), r'C:\path\to\foo');
624 }); 624 });
625 }); 625 });
626 626
627 test('toUri', () { 627 test('toUri', () {
628 expect( 628 expect(
629 context.toUri(r'C:\path\to\foo'), Uri.parse('file:///C:/path/to/foo')); 629 context.toUri(r'C:\path\to\foo'), Uri.parse('file:///C:/path/to/foo'));
630 expect(context.toUri(r'C:\path\to\foo\'), 630 expect(context.toUri(r'C:\path\to\foo\'),
631 Uri.parse('file:///C:/path/to/foo/')); 631 Uri.parse('file:///C:/path/to/foo/'));
632 expect(context.toUri(r'path\to\foo\'), Uri.parse('path/to/foo/'));
632 expect(context.toUri(r'C:\'), Uri.parse('file:///C:/')); 633 expect(context.toUri(r'C:\'), Uri.parse('file:///C:/'));
633 expect(context.toUri(r'\\server\share'), Uri.parse('file://server/share')); 634 expect(context.toUri(r'\\server\share'), Uri.parse('file://server/share'));
634 expect( 635 expect(
635 context.toUri(r'\\server\share\'), Uri.parse('file://server/share/')); 636 context.toUri(r'\\server\share\'), Uri.parse('file://server/share/'));
636 expect(context.toUri(r'foo\bar'), Uri.parse('foo/bar')); 637 expect(context.toUri(r'foo\bar'), Uri.parse('foo/bar'));
637 expect(context.toUri(r'C:\path\to\foo#bar'), 638 expect(context.toUri(r'C:\path\to\foo#bar'),
638 Uri.parse('file:///C:/path/to/foo%23bar')); 639 Uri.parse('file:///C:/path/to/foo%23bar'));
639 expect(context.toUri(r'\\server\share\path\to\foo#bar'), 640 expect(context.toUri(r'\\server\share\path\to\foo#bar'),
640 Uri.parse('file://server/share/path/to/foo%23bar')); 641 Uri.parse('file://server/share/path/to/foo%23bar'));
641 expect(context.toUri(r'C:\_{_}_`_^_ _"_%_'), 642 expect(context.toUri(r'C:\_{_}_`_^_ _"_%_'),
(...skipping 24 matching lines...) Expand all
666 667
667 test('with a root-relative URI', () { 668 test('with a root-relative URI', () {
668 expect(context.prettyUri('/D:/a/b'), r'D:\a\b'); 669 expect(context.prettyUri('/D:/a/b'), r'D:\a\b');
669 }); 670 });
670 671
671 test('with a Uri object', () { 672 test('with a Uri object', () {
672 expect(context.prettyUri(Uri.parse('a/b')), r'a\b'); 673 expect(context.prettyUri(Uri.parse('a/b')), r'a\b');
673 }); 674 });
674 }); 675 });
675 } 676 }
OLDNEW
« no previous file with comments | « test/url_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698