Added a complex query to the test_default test of the QueryKeywordParserTestCase test case.

This commit is contained in:
依瑪貓 2023-02-04 14:53:18 +08:00
parent e7fb2288ce
commit b07b0e3be4

View File

@ -98,6 +98,9 @@ class QueryKeywordParserTestCase(unittest.TestCase):
self.assertEqual(parse_query_keywords("coffee tea"), ["coffee", "tea"]) self.assertEqual(parse_query_keywords("coffee tea"), ["coffee", "tea"])
self.assertEqual(parse_query_keywords("\"coffee\" \"tea cake\""), self.assertEqual(parse_query_keywords("\"coffee\" \"tea cake\""),
["coffee", "tea cake"]) ["coffee", "tea cake"])
self.assertEqual(parse_query_keywords("\"coffee tea\" cheese "
"\"cake candy\" sugar"),
["coffee tea", "cheese", "cake candy", "sugar"])
def test_malformed(self) -> None: def test_malformed(self) -> None:
"""Tests the malformed query. """Tests the malformed query.