Add unit test for gettext parser.
This commit is contained in:
6
.idea/.idea.Claunia.Localization/.idea/encodings.xml
generated
Normal file
6
.idea/.idea.Claunia.Localization/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding">
|
||||||
|
<file url="file://$PROJECT_DIR$/Claunia.Localization.Test/gettext/es_ES.po" charset="ISO-8859-1" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
3
.idea/.idea.Claunia.Localization/riderModule.iml
generated
3
.idea/.idea.Claunia.Localization/riderModule.iml
generated
@@ -2,6 +2,9 @@
|
|||||||
<module type="RIDER_MODULE" version="4">
|
<module type="RIDER_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
|
<content url="file://$USER_HOME$/.nuget/packages/nunit3testadapter/3.11.0/build/netcoreapp1.0/NUnit3.TestAdapter.dll" />
|
||||||
|
<content url="file://$USER_HOME$/.nuget/packages/nunit3testadapter/3.11.0/build/netcoreapp1.0/NUnit3.TestAdapter.pdb" />
|
||||||
|
<content url="file://$USER_HOME$/.nuget/packages/nunit3testadapter/3.11.0/build/netcoreapp1.0/nunit.engine.netstandard.dll" />
|
||||||
<content url="file://$MODULE_DIR$/../.." />
|
<content url="file://$MODULE_DIR$/../.." />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="R User Library" level="project" />
|
<orderEntry type="library" name="R User Library" level="project" />
|
||||||
|
|||||||
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
@@ -6,6 +6,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Claunia.Localization.Deskto
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Claunia.Localization.Core", "Claunia.Localization.Core\Claunia.Localization.Core.csproj", "{CFDFDFC7-9662-4C50-B86A-9E579ACD3DF9}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Claunia.Localization.Core", "Claunia.Localization.Core\Claunia.Localization.Core.csproj", "{CFDFDFC7-9662-4C50-B86A-9E579ACD3DF9}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Claunia.Localization.Parsers", "Claunia.Localization.Parsers\Claunia.Localization.Parsers.csproj", "{8660FA2F-618D-4CD2-ABD2-31C5FD4EB2B2}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Claunia.Localization.Test", "Claunia.Localization.Test\Claunia.Localization.Test.csproj", "{76FBD8F7-6AF7-405B-B8F8-3D2F5C655ADD}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -26,5 +30,13 @@ Global
|
|||||||
{CFDFDFC7-9662-4C50-B86A-9E579ACD3DF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{CFDFDFC7-9662-4C50-B86A-9E579ACD3DF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{CFDFDFC7-9662-4C50-B86A-9E579ACD3DF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{CFDFDFC7-9662-4C50-B86A-9E579ACD3DF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{CFDFDFC7-9662-4C50-B86A-9E579ACD3DF9}.Release|Any CPU.Build.0 = Release|Any CPU
|
{CFDFDFC7-9662-4C50-B86A-9E579ACD3DF9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{8660FA2F-618D-4CD2-ABD2-31C5FD4EB2B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{8660FA2F-618D-4CD2-ABD2-31C5FD4EB2B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{8660FA2F-618D-4CD2-ABD2-31C5FD4EB2B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{8660FA2F-618D-4CD2-ABD2-31C5FD4EB2B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{76FBD8F7-6AF7-405B-B8F8-3D2F5C655ADD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{76FBD8F7-6AF7-405B-B8F8-3D2F5C655ADD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{76FBD8F7-6AF7-405B-B8F8-3D2F5C655ADD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{76FBD8F7-6AF7-405B-B8F8-3D2F5C655ADD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
Reference in New Issue
Block a user