aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs
diff options
context:
space:
mode:
authorBond_009 <Bond.009@outlook.com>2020-05-27 20:49:18 +0200
committerBond_009 <Bond.009@outlook.com>2020-05-27 20:49:18 +0200
commit7439e095e276034f05a0c9e9c7687b4a0aa1b3e5 (patch)
treec1c0a8f64157cac9117e3a885f7308802a5a98d8 /tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs
parent27ce10d0c13bc30fa1b08682e13bab67784b289d (diff)
parent777c9c7bc974fafb09e6a5a6b23bd29cf8529af9 (diff)
Merge branch 'master' into nullable3
Diffstat (limited to 'tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs')
-rw-r--r--tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs
new file mode 100644
index 000000000..26dee38c6
--- /dev/null
+++ b/tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs
@@ -0,0 +1,21 @@
+using Emby.Server.Implementations.Library;
+using Xunit;
+
+namespace Jellyfin.Server.Implementations.Tests.Library
+{
+ public class IgnorePatternsTests
+ {
+ [Theory]
+ [InlineData("/media/small.jpg", true)]
+ [InlineData("/media/movies/#Recycle/test.txt", true)]
+ [InlineData("/media/movies/#recycle/", true)]
+ [InlineData("thumbs.db", true)]
+ [InlineData(@"C:\media\movies\movie.avi", false)]
+ [InlineData("/media/.hiddendir/file.mp4", true)]
+ [InlineData("/media/dir/.hiddenfile.mp4", true)]
+ public void PathIgnored(string path, bool expected)
+ {
+ Assert.Equal(expected, IgnorePatterns.ShouldIgnore(path));
+ }
+ }
+}