Add unit test for gettext parser.

This commit is contained in:
2019-05-24 00:28:41 +01:00
parent b56eb104dc
commit 11686ccd91
6 changed files with 4896 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="nunit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
</ItemGroup>
<ItemGroup>
<None Update="gettext\es_ES.po">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Claunia.Localization.Parsers\Claunia.Localization.Parsers.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,18 @@
using System.IO;
using System.Text;
using NUnit.Framework;
namespace Claunia.Localization.Test.gettext
{
[TestFixture]
public sealed class Test
{
[Test]
public void Parse()
{
var testPath = Path.Combine(".", "gettext","es_ES.po");
var localization = Claunia.Localization.Parsers.GetText.Parse(testPath, Encoding.GetEncoding("iso8859-1"));
}
}
}

File diff suppressed because it is too large Load Diff