Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Use the proper method for getting fully resolved temporary file paths (
Browse files Browse the repository at this point in the history
…#332)

This was a bug in the tests from mono/mono#15616

Fixes mono/mono#16360
  • Loading branch information
alexischr authored and akoeplinger committed Aug 20, 2019
1 parent dbfa00c commit 4b37168
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/System.IO.FileSystem/tests/File/Copy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public void CopyOntoSelf()
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void DanglingSymlinkCopy()
{
string dangling_symlink = GetTestFileName();
string missing_target = GetTestFileName();
string dangling_symlink_new_location = GetTestFileName();
string dangling_symlink = GetTestFilePath();
string missing_target = GetTestFilePath();
string dangling_symlink_new_location = GetTestFilePath();
Assert.False(File.Exists(missing_target));
Assert.Equal(symlink(missing_target, dangling_symlink), 0);
Assert.Equal(0, symlink(missing_target, dangling_symlink));
Copy(dangling_symlink, dangling_symlink_new_location);
Assert.True(File.Exists(dangling_symlink_new_location)); // File.Exists returns true for dangling symlinks
}
Expand Down
8 changes: 4 additions & 4 deletions src/System.IO.FileSystem/tests/File/Move.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ public void MultipleMoves()
[PlatformSpecific(TestPlatforms.AnyUnix)]
public void DanglingSymlinkMove()
{
string dangling_symlink = GetTestFileName();
string missing_target = GetTestFileName();
string dangling_symlink_new_location = GetTestFileName();
string dangling_symlink = GetTestFilePath();
string missing_target = GetTestFilePath();
string dangling_symlink_new_location = GetTestFilePath();
Assert.False(File.Exists(missing_target));
Assert.Equal(symlink(missing_target, dangling_symlink), 0);
Assert.Equal(0, symlink(missing_target, dangling_symlink));
Move(dangling_symlink, dangling_symlink_new_location);
Assert.True(File.Exists(dangling_symlink_new_location)); // File.Exists returns true for dangling symlinks
}
Expand Down

0 comments on commit 4b37168

Please sign in to comment.