aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs
diff options
context:
space:
mode:
authorConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com>2020-05-29 17:42:42 -0500
committerConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com>2020-05-29 17:42:42 -0500
commit5d281adedd0d36f34dd3cb8344af3e6a44b5a29f (patch)
tree15bafdf4e3338872fb7e33e341282f4c50de0438 /tests/Jellyfin.Server.Implementations.Tests/Library/IgnorePatternsTests.cs
parent70e50dfa90575cc5e906be1509d3ed363eb1ada4 (diff)
parent02624c9df8492b019539f235307108d49774434c (diff)
Merge remote-tracking branch 'upstream/master' into quickconnect
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));
+ }
+ }
+}