Add unit test for gettext parser.
This commit is contained in:
25
Claunia.Localization.Test/Claunia.Localization.Test.csproj
Normal file
25
Claunia.Localization.Test/Claunia.Localization.Test.csproj
Normal 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>
|
||||
18
Claunia.Localization.Test/gettext/Test.cs
Normal file
18
Claunia.Localization.Test/gettext/Test.cs
Normal 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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
4832
Claunia.Localization.Test/gettext/es_ES.po
Normal file
4832
Claunia.Localization.Test/gettext/es_ES.po
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user