[corlib] Fix FileInfoTest.MoveTo_SameName test that failed on mobile
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 25 Apr 2016 21:18:32 +0000 (17:18 -0400)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 25 Apr 2016 21:20:50 +0000 (17:20 -0400)
The MoveTo target is in the current working directory instead of in the temp dir, so it runs into permission issues.
Use the temp dir instead. Fixes part 2 of #40624

mcs/class/corlib/Test/System.IO/FileInfoTest.cs

index e49a503b566f173e50586f13523d9b9fb8f0c25a..218ba79e8554516beebb729821cd92d880dc0338 100644 (file)
@@ -655,7 +655,9 @@ namespace MonoTests.System.IO
                {
                        string name = "FIT.MoveTo.SameName.Test";
                        string path1 = TempFolder + DSC + name;
-                       string path2 = name;
+                       string path2 = TempFolder + DSC + "same";
+                       Directory.CreateDirectory (path2);
+                       path2 += DSC + name;
                        DeleteFile (path1);
                        DeleteFile (path2);