mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 05:07:26 +08:00
Ensure test directories are deleted before subsequent run
This commit is contained in:
parent
0690d81bbb
commit
7641507c90
@ -233,6 +233,9 @@ namespace osu.Game.Tests.NonVisual
|
||||
|
||||
string subFolder = Path.Combine(customPath, "sub");
|
||||
|
||||
if (Directory.Exists(subFolder))
|
||||
Directory.Delete(subFolder, true);
|
||||
|
||||
Directory.CreateDirectory(subFolder);
|
||||
|
||||
Assert.Throws<ArgumentException>(() => osu.Migrate(subFolder));
|
||||
@ -255,11 +258,14 @@ namespace osu.Game.Tests.NonVisual
|
||||
|
||||
Assert.DoesNotThrow(() => osu.Migrate(customPath));
|
||||
|
||||
string subFolder = customPath + "sub";
|
||||
string seeminglySubFolder = customPath + "sub";
|
||||
|
||||
Directory.CreateDirectory(subFolder);
|
||||
if (Directory.Exists(seeminglySubFolder))
|
||||
Directory.Delete(seeminglySubFolder, true);
|
||||
|
||||
osu.Migrate(subFolder);
|
||||
Directory.CreateDirectory(seeminglySubFolder);
|
||||
|
||||
osu.Migrate(seeminglySubFolder);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user