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

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

Issue 68893017: Don't rely on a sandbox directory for pkg/path PWD tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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: 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;
}
});
}
« 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