mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
Fix path tests on windows.
BUG= Review URL: https://codereview.chromium.org//11472045 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15883 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
a050d4147d
commit
c9bacbbdb4
1 changed files with 8 additions and 3 deletions
|
@ -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.
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue