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

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

Issue 11876012: Fix minor path handling issue in path package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/lib/path.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/path/test/path_windows_test.dart
diff --git a/pkg/path/test/path_windows_test.dart b/pkg/path/test/path_windows_test.dart
index c3ee6fb3e9525ec180976fb7b6719f7dc4aa9c75..12e370b85cf9cd76bbcea19efb4575eb6207f6eb 100644
--- a/pkg/path/test/path_windows_test.dart
+++ b/pkg/path/test/path_windows_test.dart
@@ -216,7 +216,7 @@ main() {
expect(builder.normalize('.'), '.');
expect(builder.normalize('..'), '..');
expect(builder.normalize('a'), 'a');
- expect(builder.normalize('C:/'), r'C:/');
+ expect(builder.normalize('C:/'), r'C:\');
expect(builder.normalize(r'C:\'), r'C:\');
expect(builder.normalize(r'\\'), r'\\');
});
@@ -250,7 +250,7 @@ main() {
expect(builder.normalize(r'\\..\..\..'), r'\\');
expect(builder.normalize(r'\\..\../..\a'), r'\\a');
expect(builder.normalize(r'c:\..'), r'c:\');
- expect(builder.normalize(r'A:/..\..\..'), r'A:/');
+ expect(builder.normalize(r'A:/..\..\..'), r'A:\');
expect(builder.normalize(r'b:\..\..\..\a'), r'b:\a');
expect(builder.normalize(r'a\..'), '.');
expect(builder.normalize(r'a\b\..'), 'a');
@@ -282,6 +282,10 @@ main() {
expect(builder.relative(r'C:\root\path\a'), 'a');
expect(builder.relative(r'C:\root\path\a\b.txt'), r'a\b.txt');
expect(builder.relative(r'C:\root\a\b.txt'), r'..\a\b.txt');
+ expect(builder.relative(r'C:/'), r'..\..');
+ expect(builder.relative(r'C:/root'), '..');
+ expect(builder.relative(r'c:\'), r'..\..');
+ expect(builder.relative(r'c:\root'), '..');
});
test('given absolute path outside of root', () {
@@ -289,6 +293,10 @@ main() {
expect(builder.relative(r'C:\root\path\a'), 'a');
expect(builder.relative(r'C:\root\path\a\b.txt'), r'a\b.txt');
expect(builder.relative(r'C:\root\a\b.txt'), r'..\a\b.txt');
+ expect(builder.relative(r'C:/a/b'), r'..\..\a\b');
+ expect(builder.relative(r'C:/root/path/a'), 'a');
+ expect(builder.relative(r'c:\a\b'), r'..\..\a\b');
+ expect(builder.relative(r'c:\root\path\a'), 'a');
});
test('given absolute path on different drive', () {
« no previous file with comments | « pkg/path/lib/path.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698