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

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

Issue 11472045: Fix path tests on windows. (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
« no previous file with comments | « no previous file | 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 ecad7aace92c82690d55502a657e8febfa0bd869..715b26725c068cf2fdde39efd48a180ebe4aa212 100644
--- a/utils/tests/pub/path/path_windows_test.dart
+++ b/utils/tests/pub/path/path_windows_test.dart
@@ -226,9 +226,14 @@ main() {
if (io.Platform.operatingSystem == 'windows') {
test('given absolute path', () {
var b = new path.Builder(style: path.Style.windows);
- expect(r.relative(r'C:\'), b.join(b.relative(r'C:\'), r'..\..'));
- expect(r.relative(r'C:\a\b'),
- b.join(b.relative(r'C:\'), r'..\..\a\b'));
+ // TODO(rnystrom): Use a path method here to get the root prefix
+ // when one exists.
+ var drive = path.current.substring(0, 3);
+ expect(r.relative(drive), b.join(b.relative(drive), r'..\..'));
+ expect(r.relative(b.join(drive, r'a\b')),
+ b.join(b.relative(drive), r'..\..\a\b'));
+
+ // TODO(rnystrom): Test behavior when drive letters differ.
});
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698