mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
After the preparatory introduction of LineBufferedReader, it is now possible to introduce registration of fallback decoders that won't drop input supplied in the first line of the file. A fallback decoder is used when the magic in the first line of the file does not match any of the other known decoders. In such a case, the fallback decoder is constructed and provided a LineBufferedReader instance. The process of matching magic only peeks the first non-empty line, so it is available for re-reading in Decode() using ReadLine(). There can be only one fallback decoder per type; a second attempt of registering a fallback will result in an exception to avoid bugs. To address the issue of parsing failing on badly or non-headered files, set the legacy decoders for Beatmaps and Storyboards as the fallbacks. Due to non-trivial logic, several new, passing unit tests with possible edge cases also included.
28 lines
1.4 KiB
XML
28 lines
1.4 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<Import Project="..\osu.TestProject.props" />
|
|
<ItemGroup>
|
|
<None Remove="Resources\corrupted-header.osu" />
|
|
<None Remove="Resources\empty-line-instead-of-header.osu" />
|
|
<None Remove="Resources\empty-lines-at-start.osu" />
|
|
<None Remove="Resources\missing-header.osu" />
|
|
<None Remove="Resources\no-empty-line-after-header.osu" />
|
|
</ItemGroup>
|
|
<ItemGroup Label="Package References">
|
|
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
|
|
<PackageReference Include="DeepEqual" Version="2.0.0" />
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
|
|
<PackageReference Include="NUnit" Version="3.12.0" />
|
|
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
|
|
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
|
|
</ItemGroup>
|
|
<PropertyGroup Label="Project">
|
|
<OutputType>WinExe</OutputType>
|
|
<TargetFramework>netcoreapp2.2</TargetFramework>
|
|
</PropertyGroup>
|
|
<ItemGroup Label="Project References">
|
|
<ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj" />
|
|
<ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj" />
|
|
<ProjectReference Include="..\osu.Game.Rulesets.Mania\osu.Game.Rulesets.Mania.csproj" />
|
|
<ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj" />
|
|
</ItemGroup>
|
|
</Project> |