diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-06-01 18:33:17 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-06-01 18:33:17 -0500 |
| commit | 7239327610f020dcb9028a845709c79a5567869d (patch) | |
| tree | e7b87b066e68f6959fac08025a3ff25e14305162 /tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs | |
| parent | 18ecfac2d8dc2b5c768cc7cc2dc61fa23259417c (diff) | |
| download | slskd-7239327610f020dcb9028a845709c79a5567869d.tar.gz | |
gracefully handle nulls
Diffstat (limited to 'tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs')
| -rw-r--r-- | tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs b/tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs index f3638c9e..1ec2021d 100644 --- a/tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs +++ b/tests/slskd.Tests.Unit/Common/FileSafety/StripPathRootTests.cs @@ -15,6 +15,14 @@ public partial class FileSafetyTests Assert.NotNull(result); } + [Fact] + public void Returns_Null_Given_Null_Path() + { + var result = FileSafety.StripPathRoot(null); + + Assert.Null(result); + } + [Theory] [InlineData("C:\\Music\\Artist", "Music/Artist")] [InlineData("C:/Music/Artist", "Music/Artist")] |
