fix file system test on windows (#2657) [no ci]
This commit is contained in:
@@ -28,6 +28,8 @@ public class LocalSubtitlesProviderTests
|
||||
// Avatar (2009).de.srt
|
||||
// Avatar (2009).de.sdh.forced.srt
|
||||
|
||||
private readonly string _prefix = OperatingSystem.IsWindows() ? "C:\\" : "/";
|
||||
|
||||
[Test]
|
||||
public void Should_Find_All_Languages_Codecs_And_Flags_With_Full_Paths()
|
||||
{
|
||||
@@ -75,7 +77,9 @@ public class LocalSubtitlesProviderTests
|
||||
result.Count(s => s.SDH).ShouldBe(2);
|
||||
result.Count(s => s.Codec == "subrip").ShouldBe(4);
|
||||
result.Count(s => s.Codec == "ass").ShouldBe(1);
|
||||
result.All(s => s.Path.Contains(@"/Movies/Avatar (2009)/")).ShouldBeTrue();
|
||||
|
||||
string path = Path.Combine(_prefix, "Movies", "Avatar (2009)");
|
||||
result.All(s => s.Path.Contains(path)).ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -127,6 +131,8 @@ public class LocalSubtitlesProviderTests
|
||||
result.Count(s => s.SDH).ShouldBe(3);
|
||||
result.Count(s => s.Codec == "subrip").ShouldBe(5);
|
||||
result.Count(s => s.Codec == "ass").ShouldBe(2);
|
||||
result.Count(s => s.Path.Contains(@"/Movies/Avatar (2009)/")).ShouldBe(0);
|
||||
|
||||
string path = Path.Combine(_prefix, "Movies", "Avatar (2009)");
|
||||
result.Count(s => s.Path.Contains(path)).ShouldBe(0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user