diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-06-03 23:18:29 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-06-03 23:18:29 -0500 |
| commit | 57c4872e2485a7284a4afc7457591fe0efe3b87a (patch) | |
| tree | c645b95e844a240abf3b9456b2b285f157e89210 /tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs | |
| parent | 31a9b5918d49650564c4b59c8ae95a16412bef9c (diff) | |
| download | slskd-57c4872e2485a7284a4afc7457591fe0efe3b87a.tar.gz | |
fix all the tests
Diffstat (limited to 'tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs')
| -rw-r--r-- | tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs b/tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs index a3641f8b..0fc307bd 100644 --- a/tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs +++ b/tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs @@ -34,7 +34,7 @@ public partial class FileSafetyTests [InlineData("A:/single", "single")] public void Linux_Strips_DriveRoot(string input, string expected) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Linux); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Linux); Assert.Equal(expected, result); } @@ -48,7 +48,7 @@ public partial class FileSafetyTests [InlineData("c:\\Music", "Music")] public void Windows_Strips_DriveRoot(string input, string expected) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Windows); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Windows); Assert.Equal(expected, result); } @@ -60,7 +60,7 @@ public partial class FileSafetyTests [InlineData("//server", "")] // no path after server public void Linux_Strips_UncRoot(string input, string expected) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Linux); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Linux); Assert.Equal(expected, result); } @@ -72,7 +72,7 @@ public partial class FileSafetyTests [InlineData("\\\\server", "")] // no path after server public void Windows_Strips_UncRoot(string input, string expected) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Windows); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Windows); Assert.Equal(expected, result); } @@ -83,7 +83,7 @@ public partial class FileSafetyTests [InlineData("@@abcde\\Music\\Artist", "Music/Artist")] public void Linux_Strips_SoulseekQtPrefix(string input, string expected) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Linux); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Linux); Assert.Equal(expected, result); } @@ -94,7 +94,7 @@ public partial class FileSafetyTests [InlineData("@@abcde/Music/Artist", "Music\\Artist")] public void Windows_Strips_SoulseekQtPrefix(string input, string expected) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Windows); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Windows); Assert.Equal(expected, result); } @@ -104,7 +104,7 @@ public partial class FileSafetyTests [InlineData("@@abcd/Music")] // only 4 — does not match public void DoesNotStrip_SoulseekQtPrefix_When_Prefix_Too_Short(string input) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Linux); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Linux); Assert.StartsWith("@@", result); } @@ -117,7 +117,7 @@ public partial class FileSafetyTests [InlineData("foo", "foo")] public void Linux_ReturnsUnchanged_Given_Relative_Path(string input, string expected) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Linux); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Linux); Assert.Equal(expected, result); } @@ -129,7 +129,7 @@ public partial class FileSafetyTests [InlineData("foo", "foo")] public void Windows_ReturnsUnchanged_Given_Relative_Path(string input, string expected) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Windows); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Windows); Assert.Equal(expected, result); } @@ -140,7 +140,7 @@ public partial class FileSafetyTests [InlineData("/single", "/single")] public void Linux_ReturnsUnchanged_Given_Single_ForwardSlash_Prefix(string input, string expected) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Linux); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Linux); Assert.Equal(expected, result); } @@ -150,7 +150,7 @@ public partial class FileSafetyTests [InlineData("\\home\\user", "\\home\\user")] public void Windows_ReturnsUnchanged_Given_Single_BackwardSlash_Prefix(string input, string expected) { - var result = FileSafety.StripPathRoot(input, OSPlatform.Windows); + var result = FileSafety.StripPathRoot(input, OperatingSystem.Windows); Assert.Equal(expected, result); } |
