Skip to content

Commit

Permalink
refs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Dec 23, 2023
1 parent ed71792 commit 144b24b
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/Verify.ClipboardAccept/Verify.ClipboardAccept.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>$(TargetFrameworks);net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DiffEngine" Version="14.0.0" />
<PackageReference Include="DiffEngine" Version="14.1.0" />
<PackageReference Include="ConfigureAwait.Fody" Version="3.3.2" PrivateAssets="All" />
<PackageReference Include="Fody" Version="6.8.0" PrivateAssets="All" />
<PackageReference Include="TextCopy" Version="6.2.1" />
Expand Down
2 changes: 1 addition & 1 deletion src/Verify.Expecto/Verify.Expecto.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageReference Include="Fody" Version="6.8.0" PrivateAssets="All" />
<PackageReference Include="FSharp.Core" Version="8.0.100" />
<PackageReference Include="ProjectDefaults" Version="1.0.108" PrivateAssets="all" />
<PackageReference Include="EmptyFiles" Version="5.0.0" PrivateAssets="None" />
<PackageReference Include="EmptyFiles" Version="5.1.0" PrivateAssets="None" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" Condition="$(Configuration) == 'Release'" />
<ProjectReference Include="..\Verify\Verify.csproj" PrivateAssets="None" />
<None Include="buildTransitive\Verify.Expecto.props" Pack="true" PackagePath="buildTransitive\Verify.Expecto.props" />
Expand Down
2 changes: 1 addition & 1 deletion src/Verify.Fixie/Verify.Fixie.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="Fixie" Version="3.4.0" />
<PackageReference Include="Fody" Version="6.8.0" PrivateAssets="All" />
<PackageReference Include="ProjectDefaults" Version="1.0.108" PrivateAssets="all" />
<PackageReference Include="EmptyFiles" Version="5.0.0" PrivateAssets="None" />
<PackageReference Include="EmptyFiles" Version="5.1.0" PrivateAssets="None" />
<PackageReference Include="Polyfill" Version="1.34.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" Condition="$(Configuration) == 'Release'" />
<ProjectReference Include="..\Verify\Verify.csproj" PrivateAssets="None" />
Expand Down
2 changes: 1 addition & 1 deletion src/Verify.MSTest/Verify.MSTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageReference Include="ConfigureAwait.Fody" Version="3.3.2" PrivateAssets="All" />
<PackageReference Include="Fody" Version="6.8.0" PrivateAssets="All" />
<PackageReference Include="ProjectDefaults" Version="1.0.108" PrivateAssets="all" />
<PackageReference Include="EmptyFiles" Version="5.0.0" PrivateAssets="None" />
<PackageReference Include="EmptyFiles" Version="5.1.0" PrivateAssets="None" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" Condition="$(Configuration) == 'Release'" />
<ProjectReference Include="..\Verify\Verify.csproj" PrivateAssets="None" />
Expand Down
2 changes: 1 addition & 1 deletion src/Verify.NUnit/Verify.NUnit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageReference Include="Fody" Version="6.8.0" PrivateAssets="All" />
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="ProjectDefaults" Version="1.0.108" PrivateAssets="all" />
<PackageReference Include="EmptyFiles" Version="5.0.0" PrivateAssets="None" />
<PackageReference Include="EmptyFiles" Version="5.1.0" PrivateAssets="None" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" Condition="$(Configuration) == 'Release'" />
<ProjectReference Include="..\Verify\Verify.csproj" PrivateAssets="None" />
<None Include="buildTransitive\Verify.NUnit.props" Pack="true" PackagePath="buildTransitive\Verify.NUnit.props" />
Expand Down
2 changes: 1 addition & 1 deletion src/Verify.Xunit/Verify.Xunit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.extensibility.execution" Version="2.6.4" />
<PackageReference Include="ProjectDefaults" Version="1.0.108" PrivateAssets="all" />
<PackageReference Include="EmptyFiles" Version="5.0.0" PrivateAssets="None" />
<PackageReference Include="EmptyFiles" Version="5.1.0" PrivateAssets="None" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" Condition="$(Configuration) == 'Release'" />
<ProjectReference Include="..\Verify\Verify.csproj" PrivateAssets="None" />
<None Include="buildTransitive\Verify.Xunit.props" Pack="true" PackagePath="buildTransitive\Verify.Xunit.props" />
Expand Down
4 changes: 2 additions & 2 deletions src/Verify/IoHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static bool TryCopyFileStream(string path, Stream stream)
internal static Task WriteText(string path, StringBuilder text)
{
CreateDirectory(Path.GetDirectoryName(path)!);
File.WriteAllText(path, text.ToString(), VerifierSettings.GlobalEncoding);
File.WriteAllText(path, text.ToString(), VerifierSettings.Encoding);
return Task.CompletedTask;
}

Expand All @@ -146,7 +146,7 @@ internal static Task WriteText(string path, StringBuilder text)
internal static Task WriteText(string path, StringBuilder text)
{
CreateDirectory(Path.GetDirectoryName(path)!);
return File.WriteAllTextAsync(path, text.ToString(), VerifierSettings.GlobalEncoding);
return File.WriteAllTextAsync(path, text.ToString(), VerifierSettings.Encoding);
}

#endif
Expand Down
2 changes: 1 addition & 1 deletion src/Verify/Serialization/VerifierSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ internal static void Reset()
UniquePrefixDisabled = false;
UseUniqueDirectorySplitMode = false;
omitContentFromException = false;
globalEncoding = new UTF8Encoding(true, true);
encoding = new UTF8Encoding(true, true);
}

public static void UseStrictJson()
Expand Down
13 changes: 6 additions & 7 deletions src/Verify/VerifierSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ public static partial class VerifierSettings
{
internal static bool omitContentFromException;


public static void OmitContentFromException() =>
omitContentFromException = true;

Expand Down Expand Up @@ -33,20 +32,20 @@ public static void AutoVerify(bool includeBuildServer = true)
internal static bool autoVerify;

public static void UseUtf8NoBom() =>
GlobalEncoding = new UTF8Encoding(false, true);
Encoding = new UTF8Encoding(false, true);

public static void UseEncoding(Encoding encoding) =>
GlobalEncoding = encoding;
Encoding = encoding;

static Encoding globalEncoding = new UTF8Encoding(true, true);
static Encoding encoding = new UTF8Encoding(true, true);

internal static Encoding GlobalEncoding
internal static Encoding Encoding
{
get => globalEncoding;
get => encoding;
private set
{
InnerVerifier.ThrowIfVerifyHasBeenRun();
globalEncoding = value;
encoding = value;
}
}
}
4 changes: 2 additions & 2 deletions src/Verify/Verify.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<PackageReference Include="System.IO.Compression" Version="4.3.0" Condition="$(TargetFrameworkIdentifier) == '.NETFramework'" />
<PackageReference Include="System.IO.Hashing" Version="8.0.0" Condition="$(TargetFrameworkIdentifier) == '.NETFramework' or $(TargetFramework) == 'net6.0' or $(TargetFramework) == 'net7.0' or $(TargetFramework) == 'net8.0'" />
<PackageReference Include="System.Memory" Version="4.5.5" Condition="$(TargetFrameworkIdentifier) == '.NETFramework'" />
<PackageReference Include="DiffEngine" Version="14.0.0" />
<PackageReference Include="EmptyFiles" Version="5.0.0" PrivateAssets="None" />
<PackageReference Include="DiffEngine" Version="14.1.0" />
<PackageReference Include="EmptyFiles" Version="5.1.0" PrivateAssets="None" />
<PackageReference Include="ConfigureAwait.Fody" Version="3.3.2" PrivateAssets="All" />
<PackageReference Include="Fody" Version="6.8.0" PrivateAssets="All" />
<PackageReference Include="SimpleInfoName" Version="2.2.0" />
Expand Down

0 comments on commit 144b24b

Please sign in to comment.