]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/api/search/test_token_assignment.py
actions: run legacy test against newest postgresql 16
[nominatim.git] / test / python / api / search / test_token_assignment.py
index 2ed55a0f80afb06372ef27f6a49fcf840e3854cc..54e8af14cc27fb466e58a99a5d3d7ef28657e1f6 100644 (file)
@@ -337,3 +337,14 @@ def test_qualifier_after_housenumber():
                    (BreakType.WORD, PhraseType.NONE, [(3, TokenType.PARTIAL)]))
 
     check_assignments(yield_token_assignments(q))
+
+
+def test_qualifier_in_middle_of_phrase():
+    q = make_query((BreakType.START, PhraseType.NONE, [(1, TokenType.PARTIAL)]),
+                   (BreakType.PHRASE, PhraseType.NONE, [(2, TokenType.PARTIAL)]),
+                   (BreakType.WORD, PhraseType.NONE, [(3, TokenType.QUALIFIER)]),
+                   (BreakType.WORD, PhraseType.NONE, [(4, TokenType.PARTIAL)]),
+                   (BreakType.PHRASE, PhraseType.NONE, [(5, TokenType.PARTIAL)]))
+
+    check_assignments(yield_token_assignments(q))
+