mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 05:32:54 +08:00
Add test coverage for title query parsing
This commit is contained in:
parent
702266198b
commit
11577d1df0
@ -251,6 +251,18 @@ namespace osu.Game.Tests.NonVisual.Filtering
|
||||
Assert.AreEqual("my_fav", filterCriteria.Creator.SearchTerm);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestApplyTitleQueries()
|
||||
{
|
||||
const string query = "find me songs with title=\"a certain title\" 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);
|
||||
Assert.AreEqual("a certain title", filterCriteria.Title.SearchTerm);
|
||||
Assert.That(filterCriteria.Title.Exact, Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestApplyArtistQueries()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user