mirror of https://github.com/ppy/osu
Add failing source filter query test
This commit is contained in:
parent
c2b08beae8
commit
7c94973d4a
|
@ -501,6 +501,16 @@ public void TestDifficultySearch(string query, int[] expectedBeatmapIndexes)
|
|||
Assert.That(visibleBeatmaps, Is.EqualTo(expectedBeatmapIndexes));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestApplySourceQueries()
|
||||
{
|
||||
const string query = "find me songs with source=\"unit tests\" please";
|
||||
var filterCriteria = new FilterCriteria();
|
||||
FilterQueryParser.ApplyQueries(filterCriteria, query);
|
||||
Assert.AreEqual("find me songs with please", filterCriteria.SearchText.Trim());
|
||||
Assert.AreEqual(5, filterCriteria.SearchTerms.Length);
|
||||
}
|
||||
|
||||
private class CustomFilterCriteria : IRulesetFilterCriteria
|
||||
{
|
||||
public string? CustomValue { get; set; }
|
||||
|
|
Loading…
Reference in New Issue