Use a system temp directory for io test (#57)
This allows the test to work in environments where we can't write to the
`cwd` of the test process.
diff --git a/test/io_test.dart b/test/io_test.dart
index 2a83c72..da57a77 100644
--- a/test/io_test.dart
+++ b/test/io_test.dart
@@ -43,9 +43,8 @@
test('uses the previous working directory if deleted', () {
var dir = io.Directory.current.path;
try {
- var tempPath = path.normalize(path.absolute('temp_cwd'));
- var temp = io.Directory(tempPath);
- temp.createSync();
+ var temp = io.Directory.systemTemp.createTempSync('path_test');
+ var tempPath = temp.path;
io.Directory.current = temp;
// Call "current" once so that it can be cached.