Skip to content

Commit 10c778c

Browse files
authored
Fix a failing test on mac (flutter#75)
`/var` is a symlink to `/private/var`, and when setting `Directory.current` symlinks are resolved. Explicitly resolve symlinks to find the canonical path to the newly created temp directory.
1 parent 747c37c commit 10c778c

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

test/io_test.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void main() {
4343
final dir = io.Directory.current.path;
4444
try {
4545
final temp = io.Directory.systemTemp.createTempSync('path_test');
46-
final tempPath = temp.path;
46+
final tempPath = temp.resolveSymbolicLinksSync();
4747
io.Directory.current = temp;
4848

4949
// Call "current" once so that it can be cached.
@@ -57,10 +57,8 @@ void main() {
5757
io.Directory.current = dir;
5858
}
5959
},
60-
//TODO(kevmoo): figure out why this is failing on windows/mac and fix!
61-
skip: (io.Platform.isWindows || io.Platform.isMacOS)
62-
? 'Untriaged failure on Mac and Windows'
63-
: null);
60+
//TODO: Figure out why this is failing on windows and fix!
61+
skip: io.Platform.isWindows ? 'Untriaged failure on Windows' : false);
6462
});
6563

6664
test('registers changes to the working directory', () {

0 commit comments

Comments
 (0)