Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Christoforides <alexis@thenull.net>2019-08-20 21:48:25 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-08-20 21:48:25 +0300
commit4b3716814825e2e4b2f5cb12a4258b473d2f389d (patch)
tree7ef1a4e28237f483a78165b79b95fa22bc5154d8
parentdbfa00cdb2f6e8423f805f9abffe94665cd5c22f (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.cs8
-rw-r--r--src/System.IO.FileSystem/tests/File/Move.cs8
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
}