mirror of https://github.com/ppy/osu
Expand test to cover both legacy and non-legacy export paths
This commit is contained in:
parent
6a7e2dc258
commit
38e239a435
|
@ -24,7 +24,7 @@ public partial class TestSceneBeatmapSkinResources : OsuTestScene
|
|||
private BeatmapManager beatmaps { get; set; } = null!;
|
||||
|
||||
[Test]
|
||||
public void TestRetrieveJapaneseFilename()
|
||||
public void TestRetrieveAndLegacyExportJapaneseFilename()
|
||||
{
|
||||
IWorkingBeatmap beatmap = null!;
|
||||
MemoryStream outStream = null!;
|
||||
|
@ -46,6 +46,29 @@ public void TestRetrieveJapaneseFilename()
|
|||
AddAssert("sample is non-null", () => beatmap.Skin.GetSample(new SampleInfo(@"見本")) != null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRetrieveAndNonLegacyExportJapaneseFilename()
|
||||
{
|
||||
IWorkingBeatmap beatmap = null!;
|
||||
MemoryStream outStream = null!;
|
||||
|
||||
// Ensure importer encoding is correct
|
||||
AddStep("import beatmap", () => beatmap = importBeatmapFromArchives(@"japanese-filename.osz"));
|
||||
AddAssert("sample is non-null", () => beatmap.Skin.GetSample(new SampleInfo(@"見本")) != null);
|
||||
|
||||
// Ensure exporter encoding is correct (round trip)
|
||||
AddStep("export", () =>
|
||||
{
|
||||
outStream = new MemoryStream();
|
||||
|
||||
new BeatmapExporter(LocalStorage)
|
||||
.ExportToStream((BeatmapSetInfo)beatmap.BeatmapInfo.BeatmapSet!, outStream, null);
|
||||
});
|
||||
|
||||
AddStep("import beatmap again", () => beatmap = importBeatmapFromStream(outStream));
|
||||
AddAssert("sample is non-null", () => beatmap.Skin.GetSample(new SampleInfo(@"見本")) != null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRetrieveOggAudio()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue