Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: VerifyTests/DiffEngine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 15.10.1
Choose a base ref
...
head repository: VerifyTests/DiffEngine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 15.11.0
Choose a head ref
  • 5 commits
  • 6 files changed
  • 1 contributor

Commits on Mar 12, 2025

  1. Update Directory.Packages.props

    SimonCropp committed Mar 12, 2025
    Copy the full SHA
    1e34f95 View commit details
  2. refs and cleanup

    SimonCropp committed Mar 12, 2025
    Copy the full SHA
    a27464c View commit details
  3. refs and cleanup

    SimonCropp committed Mar 12, 2025
    Copy the full SHA
    f74f3c3 View commit details
  4. Update DiffRunnerTests.cs

    SimonCropp committed Mar 12, 2025
    Copy the full SHA
    310ccfe View commit details
  5. re add net462 (#613)

    SimonCropp authored Mar 12, 2025
    Copy the full SHA
    85d5871 View commit details
Showing with 15 additions and 13 deletions.
  1. +2 −2 src/DiffEngine.Tests/DiffRunnerTests.cs
  2. +3 −1 src/DiffEngine/DiffEngine.csproj
  3. +5 −5 src/DiffEngine/OsSettingsResolver.cs
  4. +1 −1 src/Directory.Build.props
  5. +3 −3 src/Directory.Packages.props
  6. +1 −1 src/global.json
4 changes: 2 additions & 2 deletions src/DiffEngine.Tests/DiffRunnerTests.cs
Original file line number Diff line number Diff line change
@@ -15,11 +15,11 @@ public async Task MaxInstancesToLaunch()
{
await Task.Delay(500);
ProcessCleanup.Refresh();
var result = DiffRunner.Launch(file1, "fake.txt");
var result = await DiffRunner.LaunchAsync(file1, "fake.txt");
await Task.Delay(300);
Assert.Equal(LaunchResult.StartedNewInstance, result);
ProcessCleanup.Refresh();
result = DiffRunner.Launch(file2, "fake.txt");
result = await DiffRunner.LaunchAsync(file2, "fake.txt");
Assert.Equal(LaunchResult.TooManyRunningDiffTools, result);
ProcessCleanup.Refresh();
DiffRunner.Kill(file1, "fake.txt");
4 changes: 3 additions & 1 deletion src/DiffEngine/DiffEngine.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT'">net472;net48;net9.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT'">net462;net472;net48;net9.0</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
@@ -12,6 +12,8 @@
<Using Include="System.Net.Sockets" />
<Using Include="EmptyFiles" />
<Using Include="System.ReadOnlySpan&lt;System.Char&gt;" Alias="CharSpan" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation"
Condition="'$(TargetFramework)' == 'net462' OR '$(TargetFramework)' == 'net472'" />
<PackageReference Include="Caseless.Fody" PrivateAssets="All" />
<PackageReference Include="EmptyFiles" PrivateAssets="None" />
<PackageReference Include="Fody" PrivateAssets="all" />
10 changes: 5 additions & 5 deletions src/DiffEngine/OsSettingsResolver.cs
Original file line number Diff line number Diff line change
@@ -27,19 +27,19 @@ public static bool Resolve(
[NotNullWhen(true)] out string? path,
[NotNullWhen(true)] out LaunchArguments? launchArguments)
{
if (TryResolveForOs(tool, osSupport.Windows, out path, OSPlatform.Windows))
if (TryResolveForOs(tool, osSupport.Windows, out path, "WINDOWS"))
{
launchArguments = osSupport.Windows.LaunchArguments;
return true;
}

if (TryResolveForOs(tool, osSupport.Linux, out path, OSPlatform.Linux))
if (TryResolveForOs(tool, osSupport.Linux, out path, "LINUX"))
{
launchArguments = osSupport.Linux.LaunchArguments;
return true;
}

if (TryResolveForOs(tool, osSupport.Osx, out path, OSPlatform.OSX))
if (TryResolveForOs(tool, osSupport.Osx, out path, "OSX"))
{
launchArguments = osSupport.Osx.LaunchArguments;
return true;
@@ -54,11 +54,11 @@ static bool TryResolveForOs(
string tool,
[NotNullWhen(true)] OsSettings? os,
[NotNullWhen(true)] out string? path,
OSPlatform platform)
string platform)
{
path = null;

if (os == null || !RuntimeInformation.IsOSPlatform(platform))
if (os == null || !OperatingSystemPolyfill.IsOSPlatform(platform))
{
return false;
}
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591;CS0649</NoWarn>
<Version>15.10.1</Version>
<Version>15.11.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageTags>Testing, Snapshot, Diff, Compare</PackageTags>
<Description>Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.</Description>
6 changes: 3 additions & 3 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -4,9 +4,9 @@
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Argon" Version="0.26.0" />
<PackageVersion Include="Argon" Version="0.27.0" />
<PackageVersion Include="Caseless.Fody" Version="1.9.1" />
<PackageVersion Include="EmptyFiles" Version="8.7.1" />
<PackageVersion Include="EmptyFiles" Version="8.8.0" />
<PackageVersion Include="Fody" Version="6.9.2" />
<PackageVersion Include="MarkdownSnippets.MsBuild" Version="27.0.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
@@ -25,7 +25,7 @@
<PackageVersion Include="Verify.DiffPlex" Version="3.1.2" />
<PackageVersion Include="Verify.ImageMagick" Version="3.6.0" />
<PackageVersion Include="Verify.WinForms" Version="4.0.0" />
<PackageVersion Include="Verify.Xunit" Version="28.14.0" />
<PackageVersion Include="Verify.Xunit" Version="28.14.1" />
<PackageVersion Include="Xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
<PackageVersion Include="XunitContext" Version="3.3.2" />
2 changes: 1 addition & 1 deletion src/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.200",
"version": "9.0.201",
"allowPrerelease": true,
"rollForward": "latestFeature"
}