Chromium Code Reviews| Index: pkg/path/test/io_test.dart |
| diff --git a/pkg/path/test/io_test.dart b/pkg/path/test/io_test.dart |
| index 1b1bea99fa7e4afb78dac7c214127663d7058899..30a20d0ad7491018718257f6d43aac64987cd3fe 100644 |
| --- a/pkg/path/test/io_test.dart |
| +++ b/pkg/path/test/io_test.dart |
| @@ -38,16 +38,15 @@ main() { |
| }); |
| test('registers changes to the working directory', () { |
| - expect(path.absolute('foo/bar'), |
| - equals(path.join(io.Directory.current.path, 'foo/bar'))); |
| - |
| - var sandbox = io.Directory.systemTemp.createTempSync('path_test_').path; |
| + var dir = io.Directory.current.path; |
| try { |
| - io.Directory.current = sandbox; |
| + expect(path.absolute('foo/bar'), equals(path.join(dir, 'foo/bar'))); |
| - expect(path.absolute('foo/bar'), equals(path.join(sandbox, 'foo/bar'))); |
| + io.Directory.current = path.dirname(dir); |
| + expect(path.normalize(path.absolute('foo/bar')), |
| + equals(path.normalize(path.join(dir, '..', 'foo/bar')))); |
|
Bob Nystrom
2013/11/14 00:37:45
Might as well do "../foo/bar" here.
nweiz
2013/11/14 00:38:33
Done.
|
| } finally { |
| - new io.Directory(sandbox).deleteSync(recursive: true); |
| + io.Directory.current = dir; |
| } |
| }); |
| } |