-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from viordash/update
Update
- Loading branch information
Showing
15 changed files
with
732 additions
and
714 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 30 additions & 24 deletions
54
ShareClipbrd/Clipboard.Core.Tests/Clipboard.Core.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" /> | ||
<PackageReference Include="NUnit" Version="3.13.3" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" /> | ||
<PackageReference Include="NUnit.Analyzers" Version="3.6.1" /> | ||
<PackageReference Include="coverlet.collector" Version="3.2.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Clipboard.Core\Clipboard.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> | ||
<PackageReference Include="NUnit" Version="4.0.1" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" /> | ||
<PackageReference Include="NUnit.Analyzers" Version="4.0.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="coverlet.collector" Version="6.0.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Clipboard.Core\Clipboard.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Label="InternalsVisibleTo"> | ||
<InternalsVisibleTo Include="Clipboard.Core.Tests" /> | ||
<InternalsVisibleTo Include="Clipboard.Win" /> | ||
<InternalsVisibleTo Include="Clipboard.X11" /> | ||
<InternalsVisibleTo Include="Clipboard" /> | ||
<InternalsVisibleTo Include="ShareClipbrdApp" /> | ||
</ItemGroup> | ||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Label="InternalsVisibleTo"> | ||
<InternalsVisibleTo Include="Clipboard.Core.Tests" /> | ||
<InternalsVisibleTo Include="Clipboard.Win" /> | ||
<InternalsVisibleTo Include="Clipboard.X11" /> | ||
<InternalsVisibleTo Include="Clipboard" /> | ||
<InternalsVisibleTo Include="ShareClipbrdApp" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net7.0-windows</TargetFrameworks> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('linux'))">net7.0</TargetFrameworks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" /> | ||
<PackageReference Include="NUnit" Version="3.13.3" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" /> | ||
<PackageReference Include="NUnit.Analyzers" Version="3.6.1" /> | ||
<PackageReference Include="coverlet.collector" Version="3.2.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Clipboard\Clipboard.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net8.0-windows</TargetFrameworks> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('linux'))">net8.0</TargetFrameworks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> | ||
<PackageReference Include="NUnit" Version="4.0.1" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" /> | ||
<PackageReference Include="NUnit.Analyzers" Version="4.0.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="coverlet.collector" Version="6.0.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Clipboard\Clipboard.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0-windows</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<UseWPF>true</UseWPF> | ||
<EnableWindowsTargeting>true</EnableWindowsTargeting> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Clipboard.Core\Clipboard.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
|
||
<ItemGroup Label="InternalsVisibleTo"> | ||
<InternalsVisibleTo Include="Clipboard" /> | ||
</ItemGroup> | ||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0-windows</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<UseWPF>true</UseWPF> | ||
<EnableWindowsTargeting>true</EnableWindowsTargeting> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Clipboard.Core\Clipboard.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
|
||
<ItemGroup Label="InternalsVisibleTo"> | ||
<InternalsVisibleTo Include="Clipboard" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Clipboard.Core\Clipboard.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Label="InternalsVisibleTo"> | ||
<InternalsVisibleTo Include="Clipboard" /> | ||
</ItemGroup> | ||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Clipboard.Core\Clipboard.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Label="InternalsVisibleTo"> | ||
<InternalsVisibleTo Include="Clipboard" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net7.0-windows</TargetFrameworks> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('linux'))">net7.0</TargetFrameworks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Clipboard.Core\Clipboard.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('windows'))"> | ||
<ProjectReference Include="..\Clipboard.Win\Clipboard.Win.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('linux'))"> | ||
<ProjectReference Include="..\Clipboard.X11\Clipboard.X11.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Label="InternalsVisibleTo"> | ||
<InternalsVisibleTo Include="ShareClipbrdApp" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net8.0-windows</TargetFrameworks> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('linux'))">net8.0</TargetFrameworks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Clipboard.Core\Clipboard.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('windows'))"> | ||
<ProjectReference Include="..\Clipboard.Win\Clipboard.Win.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('linux'))"> | ||
<ProjectReference Include="..\Clipboard.X11\Clipboard.X11.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Label="InternalsVisibleTo"> | ||
<InternalsVisibleTo Include="ShareClipbrdApp" /> | ||
</ItemGroup> | ||
|
||
</Project> |
74 changes: 37 additions & 37 deletions
74
ShareClipbrd/ShareClipbrd.Core.Tests/Helpers/PathHelperTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
using ShareClipbrd.Core.Helpers; | ||
|
||
namespace ShareClipbrd.Core.Tests.Helpers { | ||
public class PathHelperTests { | ||
[Test] | ||
public void IsAbsolute_Test() { | ||
if(OperatingSystem.IsWindows()) { | ||
Assert.True(PathHelper.IsAbsolute("C:\\ShareClipbrd\\ShareClipbrd.Core\\Clipboard\\ClipboardFile.cs")); | ||
Assert.True(PathHelper.IsAbsolute("C:\\ShareClipbrd//ClipboardFile.cs")); | ||
Assert.True(PathHelper.IsAbsolute("\\tsclient\\Documents.zip")); | ||
Assert.False(PathHelper.IsAbsolute("//")); | ||
Assert.False(PathHelper.IsAbsolute("//tsclient/Documents.zip")); | ||
Assert.False(PathHelper.IsAbsolute("//file/1")); | ||
Assert.False(PathHelper.IsAbsolute("//file")); | ||
} | ||
|
||
if(OperatingSystem.IsLinux()) { | ||
Assert.True(PathHelper.IsAbsolute("/ShareClipbrd/ShareClipbrd.Core/Clipboard/ClipboardFile.cs")); | ||
Assert.True(PathHelper.IsAbsolute("/ShareClipbrd//ClipboardFile.cs")); | ||
Assert.True(PathHelper.IsAbsolute("/tsclient/Documents.zip")); | ||
Assert.True(PathHelper.IsAbsolute("//")); | ||
Assert.True(PathHelper.IsAbsolute("//tsclient/Documents.zip")); | ||
Assert.True(PathHelper.IsAbsolute("//file/1")); | ||
Assert.True(PathHelper.IsAbsolute("//file")); | ||
} | ||
Assert.True(PathHelper.IsAbsolute("/home/Documents.zip")); | ||
|
||
Assert.False(PathHelper.IsAbsolute("ShareClipbrd\\ShareClipbrd.Core\\Clipboard\\ClipboardFile.cs")); | ||
Assert.False(PathHelper.IsAbsolute("ShareClipbrd/ShareClipbrd.Core/Clipboard/ClipboardFile.cs")); | ||
Assert.False(PathHelper.IsAbsolute("Documents")); | ||
Assert.False(PathHelper.IsAbsolute(" ")); | ||
Assert.False(PathHelper.IsAbsolute("/")); | ||
Assert.False(PathHelper.IsAbsolute("\\")); | ||
Assert.False(PathHelper.IsAbsolute("\\\\")); | ||
} | ||
} | ||
} | ||
using ShareClipbrd.Core.Helpers; | ||
|
||
namespace ShareClipbrd.Core.Tests.Helpers { | ||
public class PathHelperTests { | ||
[Test] | ||
public void IsAbsolute_Test() { | ||
if(OperatingSystem.IsWindows()) { | ||
Assert.That(PathHelper.IsAbsolute("C:\\ShareClipbrd\\ShareClipbrd.Core\\Clipboard\\ClipboardFile.cs"), Is.True); | ||
Assert.That(PathHelper.IsAbsolute("C:\\ShareClipbrd//ClipboardFile.cs"), Is.True); | ||
Assert.That(PathHelper.IsAbsolute("\\tsclient\\Documents.zip"), Is.True); | ||
Assert.That(PathHelper.IsAbsolute("//"), Is.False); | ||
Assert.That(PathHelper.IsAbsolute("//tsclient/Documents.zip"), Is.False); | ||
Assert.That(PathHelper.IsAbsolute("//file/1"), Is.False); | ||
Assert.That(PathHelper.IsAbsolute("//file"), Is.False); | ||
} | ||
|
||
if(OperatingSystem.IsLinux()) { | ||
Assert.That(PathHelper.IsAbsolute("/ShareClipbrd/ShareClipbrd.Core/Clipboard/ClipboardFile.cs"), Is.True); | ||
Assert.That(PathHelper.IsAbsolute("/ShareClipbrd//ClipboardFile.cs"), Is.True); | ||
Assert.That(PathHelper.IsAbsolute("/tsclient/Documents.zip"), Is.True); | ||
Assert.That(PathHelper.IsAbsolute("//"), Is.True); | ||
Assert.That(PathHelper.IsAbsolute("//tsclient/Documents.zip"), Is.True); | ||
Assert.That(PathHelper.IsAbsolute("//file/1"), Is.True); | ||
Assert.That(PathHelper.IsAbsolute("//file"), Is.True); | ||
} | ||
Assert.That(PathHelper.IsAbsolute("/home/Documents.zip"), Is.True); | ||
|
||
Assert.That(PathHelper.IsAbsolute("ShareClipbrd\\ShareClipbrd.Core\\Clipboard\\ClipboardFile.cs"), Is.False); | ||
Assert.That(PathHelper.IsAbsolute("ShareClipbrd/ShareClipbrd.Core/Clipboard/ClipboardFile.cs"), Is.False); | ||
Assert.That(PathHelper.IsAbsolute("Documents"), Is.False); | ||
Assert.That(PathHelper.IsAbsolute(" "), Is.False); | ||
Assert.That(PathHelper.IsAbsolute("/"), Is.False); | ||
Assert.That(PathHelper.IsAbsolute("\\"), Is.False); | ||
Assert.That(PathHelper.IsAbsolute("\\\\"), Is.False); | ||
} | ||
} | ||
} |
Oops, something went wrong.