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

Unified Diff: utils/tests/pub/path/path_windows_test.dart

Issue 11512011: Handle relative paths where the trailing directory has an extension. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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
« utils/pub/path.dart ('K') | « utils/tests/pub/path/path_posix_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/path/path_windows_test.dart
diff --git a/utils/tests/pub/path/path_windows_test.dart b/utils/tests/pub/path/path_windows_test.dart
index 715b26725c068cf2fdde39efd48a180ebe4aa212..da6f6bc173d1df6ed19c24f00fbd6a0695fe86a7 100644
--- a/utils/tests/pub/path/path_windows_test.dart
+++ b/utils/tests/pub/path/path_windows_test.dart
@@ -250,7 +250,12 @@ main() {
});
});
- test('given absolute with differnt root prefix', () {
+ test('from a root with extension', () {
+ var r = new path.Builder(style: path.Style.windows, root: r'C:\dir.ext');
+ expect(r.relative(r'C:\dir.ext\file'), 'file');
+ });
+
+ test('given absolute with different root prefix', () {
expect(builder.relative(r'D:\a\b'), r'D:\a\b');
expect(builder.relative(r'\\a\b'), r'\\a\b');
});
@@ -296,5 +301,6 @@ main() {
expect(builder.withoutExtension(r'a.b\c'), r'a.b\c');
expect(builder.withoutExtension(r'a\b/c'), r'a\b/c');
expect(builder.withoutExtension(r'a\b/c.d'), r'a\b/c');
+ expect(builder.withoutExtension(r'a.b/c'), r'a.b/c');
nweiz 2012/12/11 02:09:42 This should probably also be added to path_posix_t
});
}
« utils/pub/path.dart ('K') | « utils/tests/pub/path/path_posix_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698