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

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

Issue 58903005: Have pkg/path track the current working directory if it changes. (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 | « pkg/path/lib/path.dart ('k') | 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 665124954c27bb1c344096e4094436cdfca01a9e..1b1bea99fa7e4afb78dac7c214127663d7058899 100644
--- a/pkg/path/test/io_test.dart
+++ b/pkg/path/test/io_test.dart
@@ -36,4 +36,18 @@ main() {
test('current', () {
expect(path.current, io.Directory.current.path);
});
+
+ 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;
+ try {
+ io.Directory.current = sandbox;
+
+ expect(path.absolute('foo/bar'), equals(path.join(sandbox, 'foo/bar')));
+ } finally {
+ new io.Directory(sandbox).deleteSync(recursive: true);
+ }
+ });
}
« no previous file with comments | « pkg/path/lib/path.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698