From 961058f5c8ca538b1a96a82651b30e49b92c90c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 12 Mar 2024 09:05:28 +0100 Subject: [PATCH] Add failing test case --- .../Archives/skin-with-subfolder-zip-entries.osk | Bin 0 -> 894 bytes osu.Game.Tests/Skins/IO/ImportSkinTest.cs | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 osu.Game.Tests/Resources/Archives/skin-with-subfolder-zip-entries.osk diff --git a/osu.Game.Tests/Resources/Archives/skin-with-subfolder-zip-entries.osk b/osu.Game.Tests/Resources/Archives/skin-with-subfolder-zip-entries.osk new file mode 100644 index 0000000000000000000000000000000000000000..013bca3801866f95f7139fbed30f96fb2a6b2639 GIT binary patch literal 894 zcmWIWW@Zs#0D)fToCq)jN+aJ8o04|V8AWw2I zfK1XY?5o`hL%~fhOr?=4GDkw_SJ0K%k|1ep1|jmnGM2G-Y{9ME;m|BpsAa zdiX}EdTqz%zyg(Z44p4_Fr3YD|D0*^dB@$=T(75H%;>qrZuxLUl1|$^qZKpCQXYC3 z#yQ^GeEcET*{AILmN4?)b)Ee8k;Bi_RSP&LwpzKFwp97OxN&0g#UpQ@>CDl1clVL& zm59~7Cw(RLCr>>h`BUbIZ}-+&SvgO1Zgt--I_0?Z*!?H>cjm9{y*o)W$#hTc2C>C+ z_D=kJe3g2DHzSih1FjfU0eTMvKmi5@6ekwJnX*M{T1U&$?CAfWZSSn=z9F%;pB5t+Rm`J%J$Gz#u;>J*p6w-*6=rWE-9W ZZGa^l;!I{`18QMl0m2o)Fg*YcR{%bq?(hHr literal 0 HcmV?d00001 diff --git a/osu.Game.Tests/Skins/IO/ImportSkinTest.cs b/osu.Game.Tests/Skins/IO/ImportSkinTest.cs index 606a5afac2..62e7a80435 100644 --- a/osu.Game.Tests/Skins/IO/ImportSkinTest.cs +++ b/osu.Game.Tests/Skins/IO/ImportSkinTest.cs @@ -173,6 +173,16 @@ namespace osu.Game.Tests.Skins.IO assertCorrectMetadata(import1, "name 1 [my custom skin 1]", "author 1", 1.0m, osu); }); + [Test] + public Task TestImportWithSubfolder() => runSkinTest(async osu => + { + const string filename = "Archives/skin-with-subfolder-zip-entries.osk"; + var import = await loadSkinIntoOsu(osu, new ImportTask(TestResources.OpenResource(filename), filename)); + + assertCorrectMetadata(import, $"Totally fully features skin [Real Skin with Real Features] [{filename[..^4]}]", "Unknown", 2.7m, osu); + Assert.That(import.PerformRead(r => r.Files.Count), Is.EqualTo(3)); + }); + #endregion #region Cases where imports should be uniquely imported