diff options
author | Alexis Christoforides <alexis@thenull.net> | 2019-08-20 21:48:25 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-08-20 21:48:25 +0300 |
commit | 4b3716814825e2e4b2f5cb12a4258b473d2f389d (patch) | |
tree | 7ef1a4e28237f483a78165b79b95fa22bc5154d8 | |
parent | dbfa00cdb2f6e8423f805f9abffe94665cd5c22f (diff) |
Use the proper method for getting fully resolved temporary file paths (#332)
This was a bug in the tests from mono/mono#15616
Fixes https://github.com/mono/mono/issues/16360
-rw-r--r-- | src/System.IO.FileSystem/tests/File/Copy.cs | 8 | ||||
-rw-r--r-- | src/System.IO.FileSystem/tests/File/Move.cs | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/System.IO.FileSystem/tests/File/Copy.cs b/src/System.IO.FileSystem/tests/File/Copy.cs index 2cf108e8db..610f8e0414 100644 --- a/src/System.IO.FileSystem/tests/File/Copy.cs +++ b/src/System.IO.FileSystem/tests/File/Copy.cs @@ -56,11 +56,11 @@ namespace System.IO.Tests [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 } diff --git a/src/System.IO.FileSystem/tests/File/Move.cs b/src/System.IO.FileSystem/tests/File/Move.cs index 6548b4f564..ce2c7d0918 100644 --- a/src/System.IO.FileSystem/tests/File/Move.cs +++ b/src/System.IO.FileSystem/tests/File/Move.cs @@ -182,11 +182,11 @@ namespace System.IO.Tests [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 } |