Skip to content

Commit

Permalink
Update utf-7 reliant tests to utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
farlee2121 committed Dec 5, 2023
1 parent 6e73449 commit 0d5e7f8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Tests/ResXFileRef.ConverterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ public void ConvertFrom_ReadsFileAsString()

Assert.Equal(expected, result);
}


[Fact]
public void ConvertFrom_ReadsFileAsStringUsingEncodingFromRefString()
{
var resxFileRefString = @"TestResources/Files/text.utf7.txt;System.String;utf-7";
var resxFileRefString = @"TestResources\Files\text.utf8.txt;System.String;utf-8";
var expected = "Привет";
var converter = new ResXFileRef.Converter();

Expand Down
3 changes: 2 additions & 1 deletion Tests/System.Resources.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8</TargetFramework>
Expand All @@ -18,6 +18,7 @@
<PackageReference Include="System.Drawing.Common" Version="4.7.2" />
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageReference Include="System.Resources.Extensions" Version="7.0.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<Content Include="TestResources\**">
Expand Down
1 change: 0 additions & 1 deletion Tests/TestResources/Files/text.utf7.txt

This file was deleted.

1 change: 1 addition & 0 deletions Tests/TestResources/Files/text.utf8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Привет

0 comments on commit 0d5e7f8

Please sign in to comment.