mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Merge branch 'fix-nested-folder-migration-endless-copy' into migration-ui
This commit is contained in:
@ -223,7 +223,7 @@ namespace osu.Game.Tests.NonVisual
|
||||
[Test]
|
||||
public void TestMigrationToNestedTargetFails()
|
||||
{
|
||||
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(TestMigrationToSameTargetFails)))
|
||||
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(TestMigrationToNestedTargetFails)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -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));
|
||||
@ -244,6 +247,33 @@ namespace osu.Game.Tests.NonVisual
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestMigrationToSeeminglyNestedTarget()
|
||||
{
|
||||
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(TestMigrationToSeeminglyNestedTarget)))
|
||||
{
|
||||
try
|
||||
{
|
||||
var osu = loadOsu(host);
|
||||
|
||||
Assert.DoesNotThrow(() => osu.Migrate(customPath));
|
||||
|
||||
string seeminglySubFolder = customPath + "sub";
|
||||
|
||||
if (Directory.Exists(seeminglySubFolder))
|
||||
Directory.Delete(seeminglySubFolder, true);
|
||||
|
||||
Directory.CreateDirectory(seeminglySubFolder);
|
||||
|
||||
osu.Migrate(seeminglySubFolder);
|
||||
}
|
||||
finally
|
||||
{
|
||||
host.Exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private OsuGameBase loadOsu(GameHost host)
|
||||
{
|
||||
var osu = new OsuGameBase();
|
||||
|
@ -33,7 +33,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
public new ScoreProcessor ScoreProcessor => base.ScoreProcessor;
|
||||
public new HUDOverlay HUDOverlay => base.HUDOverlay;
|
||||
public new bool AllowFail => base.AllowFail;
|
||||
|
||||
public bool AllowFail => base.CheckModsAllowFailure();
|
||||
|
||||
protected override bool PauseOnFocusLost => false;
|
||||
|
||||
|
Reference in New Issue
Block a user