diff --git a/docs/diff-tool.md b/docs/diff-tool.md index 4dbe8f75fb..9e951c0967 100644 --- a/docs/diff-tool.md +++ b/docs/diff-tool.md @@ -87,6 +87,10 @@ This behavior is currently supported on Windows. On Linux and OSX, diff tool ins * `%ProgramFiles%\JetBrains\JetBrains Rider *\bin\rider64.exe` +### OSX scanned paths: + + * `/Applications/Rider*/Contents/MacOS/rider` + ## [VisualStudio](https://docs.microsoft.com/en-us/visualstudio/ide/reference/diff) * IsMdi: True diff --git a/src/DiffEngine.Tests/DiffEngine.Tests.csproj b/src/DiffEngine.Tests/DiffEngine.Tests.csproj index ad3dae1a61..11b1a48d4c 100644 --- a/src/DiffEngine.Tests/DiffEngine.Tests.csproj +++ b/src/DiffEngine.Tests/DiffEngine.Tests.csproj @@ -1,9 +1,12 @@  - netcoreapp3.1;net48 + netcoreapp3.1 true + + netcoreapp3.1;net48 + diff --git a/src/DiffEngine.Tests/DiffToolsTest.cs b/src/DiffEngine.Tests/DiffToolsTest.cs index 083e4b18d6..6e6fa1b5db 100644 --- a/src/DiffEngine.Tests/DiffToolsTest.cs +++ b/src/DiffEngine.Tests/DiffToolsTest.cs @@ -65,6 +65,7 @@ public void WriteFoundTools() writer.WriteLine($@" * `{path}`"); } } + if (!tool.BinaryExtensions.Any()) { continue; @@ -114,6 +115,8 @@ public void ExtensionLookup() Debug.WriteLine($"{tool.Key}: {tool.Value.Name}"); } } + +#if DEBUG [Fact] public void TryFind() { @@ -132,6 +135,7 @@ public void TryFind() Assert.False(DiffTools.TryFind(DiffTool.Kaleidoscope, "txt", out resolved)); Assert.Null(resolved); } +#endif public DiffToolsTest(ITestOutputHelper output) : base(output) diff --git a/src/DiffEngine.Tests/ProcessCleanupTests.cs b/src/DiffEngine.Tests/ProcessCleanupTests.cs index 42e624f6cc..fd5343d6b6 100644 --- a/src/DiffEngine.Tests/ProcessCleanupTests.cs +++ b/src/DiffEngine.Tests/ProcessCleanupTests.cs @@ -1,4 +1,5 @@ -using System.Diagnostics; +#if DEBUG +using System.Diagnostics; using System.Linq; using DiffEngine; using VerifyXunit; @@ -22,4 +23,5 @@ public ProcessCleanupTests(ITestOutputHelper output) : base(output) { } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/DiffEngine.Tests/diffTools.include.md b/src/DiffEngine.Tests/diffTools.include.md index 6227b9f523..977b809543 100644 --- a/src/DiffEngine.Tests/diffTools.include.md +++ b/src/DiffEngine.Tests/diffTools.include.md @@ -8,6 +8,10 @@ * `%ProgramFiles%\JetBrains\JetBrains Rider *\bin\rider64.exe` +### OSX scanned paths: + + * `/Applications/Rider*/Contents/MacOS/rider` + ## [VisualStudio](https://docs.microsoft.com/en-us/visualstudio/ide/reference/diff) * IsMdi: True diff --git a/src/DiffEngine/DiffEngine.csproj b/src/DiffEngine/DiffEngine.csproj index cc5f8959cb..cc7104f51d 100644 --- a/src/DiffEngine/DiffEngine.csproj +++ b/src/DiffEngine/DiffEngine.csproj @@ -1,10 +1,13 @@  + netstandard2.0;netstandard2.1 + + netstandard2.0;netstandard2.1;net461 - + diff --git a/src/DiffEngine/ProcessCleanup.cs b/src/DiffEngine/ProcessCleanup.cs index 6a89e53152..4df641f7b2 100644 --- a/src/DiffEngine/ProcessCleanup.cs +++ b/src/DiffEngine/ProcessCleanup.cs @@ -21,7 +21,6 @@ static ProcessCleanup() public static void Refresh() { - Thread.Sleep(100); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { commands = FindAll().ToList(); diff --git a/src/DiffEngine/ToolDefinition.cs b/src/DiffEngine/ToolDefinition.cs index 1cd3e39688..67ec5eac31 100644 --- a/src/DiffEngine/ToolDefinition.cs +++ b/src/DiffEngine/ToolDefinition.cs @@ -19,7 +19,8 @@ class ToolDefinition public string[] OsxExePaths { get; } public bool SupportsText { get; } - public ToolDefinition(DiffTool name, + public ToolDefinition( + DiffTool name, string url, bool supportsAutoRefresh, bool isMdi, diff --git a/src/FakeDiffTool/FakeDiffTool.csproj b/src/FakeDiffTool/FakeDiffTool.csproj index 4b5bc6b843..4e7a95c244 100644 --- a/src/FakeDiffTool/FakeDiffTool.csproj +++ b/src/FakeDiffTool/FakeDiffTool.csproj @@ -3,7 +3,7 @@ Exe netcoreapp3.1 - false + false bin diff --git a/src/Verify.Bunit/Verify.Bunit.csproj b/src/Verify.Bunit/Verify.Bunit.csproj index e92ed56b9d..4e8085610c 100644 --- a/src/Verify.Bunit/Verify.Bunit.csproj +++ b/src/Verify.Bunit/Verify.Bunit.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/Verify.Integration.Tests/AssemblyLocation.cs b/src/Verify.Integration.Tests/AssemblyLocation.cs new file mode 100644 index 0000000000..39afdf41dd --- /dev/null +++ b/src/Verify.Integration.Tests/AssemblyLocation.cs @@ -0,0 +1,17 @@ +using System; +using System.IO; + +static class AssemblyLocation +{ + static AssemblyLocation() + { + var assembly = typeof(AssemblyLocation).Assembly; + + var uri = new UriBuilder(assembly.CodeBase!); + var path = Uri.UnescapeDataString(uri.Path); + + CurrentDirectory = Path.GetDirectoryName(path)!; + } + + public static string CurrentDirectory; +} \ No newline at end of file diff --git a/src/Verify.Integration.Tests/Tests.cs b/src/Verify.Integration.Tests/Tests.cs index a2d7766d91..158e996233 100644 --- a/src/Verify.Integration.Tests/Tests.cs +++ b/src/Verify.Integration.Tests/Tests.cs @@ -1,4 +1,5 @@ -using System; +#if DEBUG +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -21,7 +22,7 @@ public partial class Tests : static Tests() { BuildServerDetector.Detected = false; - var diffToolPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, "../../../../FakeDiffTool/bin/FakeDiffTool.exe")); + var diffToolPath = Path.GetFullPath(Path.Combine(AssemblyLocation.CurrentDirectory, "../../../../FakeDiffTool/bin/FakeDiffTool.exe")); tool = new ResolvedDiffTool( name: DiffTool.VisualStudio, exePath: diffToolPath, @@ -131,4 +132,5 @@ public Tests(ITestOutputHelper output) : { ClipboardCapture.Clear(); } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/Verify.Integration.Tests/Tests_Single.cs b/src/Verify.Integration.Tests/Tests_Single.cs index 6ef7664539..2f73e85af8 100644 --- a/src/Verify.Integration.Tests/Tests_Single.cs +++ b/src/Verify.Integration.Tests/Tests_Single.cs @@ -1,4 +1,5 @@ -using System; +#if DEBUG +using System; using System.IO; using System.Threading.Tasks; using DiffEngine; @@ -132,4 +133,5 @@ async Task InitialVerify(Func target, bool hasMatchingDiffTool, VerifySe AssertExists(pair.Received); } } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/Verify.Integration.Tests/Tests_Split.cs b/src/Verify.Integration.Tests/Tests_Split.cs index f1db653e71..3f6e199760 100644 --- a/src/Verify.Integration.Tests/Tests_Split.cs +++ b/src/Verify.Integration.Tests/Tests_Split.cs @@ -1,4 +1,6 @@ -using System.IO; +#if DEBUG + +using System.IO; using System.Threading.Tasks; using DiffEngine; using Verify; @@ -122,4 +124,5 @@ async Task InitialVerifySplit(TypeToSplit target, bool hasMatchingDiffTool, Veri AssertExists(file2.Received); } } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/Verify.MSTest.Tests/Verify.MSTest.Tests.csproj b/src/Verify.MSTest.Tests/Verify.MSTest.Tests.csproj index 0a5fee2563..36928b6aa4 100644 --- a/src/Verify.MSTest.Tests/Verify.MSTest.Tests.csproj +++ b/src/Verify.MSTest.Tests/Verify.MSTest.Tests.csproj @@ -1,9 +1,12 @@  - netcoreapp3.1;net48 + netcoreapp3.1 true + + netcoreapp3.1;net48 + diff --git a/src/Verify.MSTest/Verify.MSTest.csproj b/src/Verify.MSTest/Verify.MSTest.csproj index f6abdd84ed..9d4f0f01d4 100644 --- a/src/Verify.MSTest/Verify.MSTest.csproj +++ b/src/Verify.MSTest/Verify.MSTest.csproj @@ -1,13 +1,16 @@  - netstandard2.0;netstandard2.1;net472 + netstandard2.0;netstandard2.1 $(NoWarn);CS0436 + + netstandard2.0;netstandard2.1;net472 + - + diff --git a/src/Verify.NUnit.Tests/Verify.NUnit.Tests.csproj b/src/Verify.NUnit.Tests/Verify.NUnit.Tests.csproj index 5417ec679a..0ddf63d00b 100644 --- a/src/Verify.NUnit.Tests/Verify.NUnit.Tests.csproj +++ b/src/Verify.NUnit.Tests/Verify.NUnit.Tests.csproj @@ -1,9 +1,12 @@  - netcoreapp3.1;net48 + netcoreapp3.1 true + + netcoreapp3.1;net48 + diff --git a/src/Verify.NUnit/Verify.NUnit.csproj b/src/Verify.NUnit/Verify.NUnit.csproj index 2dd2a1b047..4417083b49 100644 --- a/src/Verify.NUnit/Verify.NUnit.csproj +++ b/src/Verify.NUnit/Verify.NUnit.csproj @@ -1,12 +1,15 @@  + netstandard2.0;netstandard2.1 + + netstandard2.0;netstandard2.1;net472 - + diff --git a/src/Verify.Tests/Converters/ExtensionConverterTests.cs b/src/Verify.Tests/Converters/ExtensionConverterTests.cs index c0c9c4a9ad..89ffbae7a7 100644 --- a/src/Verify.Tests/Converters/ExtensionConverterTests.cs +++ b/src/Verify.Tests/Converters/ExtensionConverterTests.cs @@ -1,4 +1,4 @@ -#if(NETCOREAPP3_1) +#if(NETCOREAPP3_1 && DEBUG) using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; diff --git a/src/Verify.Tests/Verify.Tests.csproj b/src/Verify.Tests/Verify.Tests.csproj index 9d201c85b1..c08da13f68 100644 --- a/src/Verify.Tests/Verify.Tests.csproj +++ b/src/Verify.Tests/Verify.Tests.csproj @@ -1,10 +1,16 @@  - netcoreapp3.1;net48 + netcoreapp3.1 true CS8002 + + netcoreapp3.1;net48 + + + + diff --git a/src/Verify.Xunit.Tests/Verify.Xunit.Tests.csproj b/src/Verify.Xunit.Tests/Verify.Xunit.Tests.csproj index edd6062cd3..2c54476bda 100644 --- a/src/Verify.Xunit.Tests/Verify.Xunit.Tests.csproj +++ b/src/Verify.Xunit.Tests/Verify.Xunit.Tests.csproj @@ -1,9 +1,12 @@  - netcoreapp3.1;net48 + netcoreapp3.1 true + + netcoreapp3.1;net48 + diff --git a/src/Verify.Xunit/Verify.Xunit.csproj b/src/Verify.Xunit/Verify.Xunit.csproj index 8425569e63..d68eff3e94 100644 --- a/src/Verify.Xunit/Verify.Xunit.csproj +++ b/src/Verify.Xunit/Verify.Xunit.csproj @@ -1,11 +1,14 @@  + netstandard2.0;netstandard2.1 + + netstandard2.0;netstandard2.1;net472 - + diff --git a/src/Verify/Verify.csproj b/src/Verify/Verify.csproj index b636ff7bd6..5ea5751f17 100644 --- a/src/Verify/Verify.csproj +++ b/src/Verify/Verify.csproj @@ -1,5 +1,8 @@  + netstandard2.0;netstandard2.1 + + netstandard2.0;netstandard2.1;net472 diff --git a/src/appveyor.yml b/src/appveyor.yml index 42cfdf2a65..8b2789f6c8 100644 --- a/src/appveyor.yml +++ b/src/appveyor.yml @@ -1,4 +1,6 @@ -image: Visual Studio 2019 +image: +- macos +- Visual Studio 2019 skip_commits: message: /doco|Merge pull request.*/ build_script: