Feature/rutracker music album rerelease. resolves #11161 (#11275)

This commit is contained in:
XYZJR
2021-03-15 00:51:10 +01:00
committed by GitHub
parent 1e4a407aad
commit 6d79cab496
3 changed files with 302 additions and 107 deletions

View File

@@ -123,5 +123,28 @@ namespace Jackett.Test.Common.Utils
CollectionAssert.AreEqual(combined, original.ToEnumerable());
CollectionAssert.AreEqual(duplicateKeys, original.ToEnumerable(true));
}
[Test]
public void FindSubstringsBetween_ValidEntries_Succeeds()
{
var stringParts = new string[] { "<test>", "<abc>", "<def>" };
var source = string.Concat(stringParts);
var results = source.FindSubstringsBetween('<', '>', true);
CollectionAssert.AreEqual(stringParts, results);
}
[Test]
public void FindSubstringsBetween_NestedEntries_Succeeds()
{
var stringParts = new string[] { "(test(abc))", "(def)", "(ghi)" };
var source = string.Concat(stringParts);
var results = source.FindSubstringsBetween('(', ')', false);
var expectedParts = new string[] { "abc", "test(abc)", "def", "ghi" };
CollectionAssert.AreEqual(expectedParts, results);
}
}
}