1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Add test coverage ensuring images are not read as videos

This commit is contained in:
Dean Herbert 2023-03-13 18:15:17 +09:00
parent 12f240e11a
commit 3aea058c98
2 changed files with 19 additions and 0 deletions

View File

@ -169,6 +169,21 @@ namespace osu.Game.Tests.Beatmaps.Formats
}
}
[Test]
public void TestDecodeImageSpecifiedAsVideo()
{
var decoder = new LegacyStoryboardDecoder();
using (var resStream = TestResources.OpenResource("image-specified-as-video.osb"))
using (var stream = new LineBufferedReader(resStream))
{
var storyboard = decoder.Decode(stream);
StoryboardLayer foreground = storyboard.Layers.Single(l => l.Name == "Video");
Assert.That(foreground.Elements.Count, Is.Zero);
}
}
[Test]
public void TestDecodeOutOfRangeLoopAnimationType()
{

View File

@ -0,0 +1,4 @@
osu file format v14
[Events]
Video,0,"BG.jpg",0,0