mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-01 11:23:36 +02:00
Add more tests, update comment
This commit is contained in:
parent
de708d2fca
commit
7fa80ac3e0
|
@ -19,6 +19,7 @@ namespace Emby.Server.Implementations.Library
|
||||||
"**/small.jpg",
|
"**/small.jpg",
|
||||||
"**/albumart.jpg",
|
"**/albumart.jpg",
|
||||||
|
|
||||||
|
// We have neither non-greedy matching or character group repetitions, working around that here.
|
||||||
// https://github.com/dazinator/DotNet.Glob#patterns
|
// https://github.com/dazinator/DotNet.Glob#patterns
|
||||||
"**/*.sample.?",
|
"**/*.sample.?",
|
||||||
"**/*.sample.??",
|
"**/*.sample.??",
|
||||||
|
|
|
@ -28,6 +28,10 @@ namespace Jellyfin.Server.Implementations.Tests.Library
|
||||||
[InlineData("/directory/@Recycle/file.mp3", true)]
|
[InlineData("/directory/@Recycle/file.mp3", true)]
|
||||||
[InlineData("/media/movies/.@__thumb", true)]
|
[InlineData("/media/movies/.@__thumb", true)]
|
||||||
[InlineData("/media/movies/.@__thumb/foo-bar-thumbnail.png", true)]
|
[InlineData("/media/movies/.@__thumb/foo-bar-thumbnail.png", true)]
|
||||||
|
[InlineData("/media/music/Foo B.A.R./epic.flac", false)]
|
||||||
|
[InlineData("/media/music/Foo B.A.R", false)]
|
||||||
|
// This test is pending an upstream fix: https://github.com/dazinator/DotNet.Glob/issues/78
|
||||||
|
// [InlineData("/media/music/Foo B.A.R.", false)]
|
||||||
public void PathIgnored(string path, bool expected)
|
public void PathIgnored(string path, bool expected)
|
||||||
{
|
{
|
||||||
Assert.Equal(expected, IgnorePatterns.ShouldIgnore(path));
|
Assert.Equal(expected, IgnorePatterns.ShouldIgnore(path));
|
||||||
|
|
Loading…
Reference in a new issue