From 6e62ccab3834723ece823a9f7bf29e6270110bf0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 19 Jun 2021 11:50:46 +0530 Subject: [PATCH] Forgot to test boolean operators in queries --- src/calibre/db/tests/fts.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/calibre/db/tests/fts.py b/src/calibre/db/tests/fts.py index fdef37545d..65687fc647 100644 --- a/src/calibre/db/tests/fts.py +++ b/src/calibre/db/tests/fts.py @@ -144,4 +144,9 @@ class FTSTest(BaseTest): self.ae(conn.search('NEAR("one two" "three four")'), [('>one two< >three four<…',)]) self.ae(conn.search('NEAR(one six, 2)'), []) + conn.insert_text('moose cat') + self.ae(conn.search('moose OR one'), [('>moose< cat',), ('>one< two three four…',)]) + self.ae(conn.search('(moose OR one) NOT cat'), [('>one< two three four…',)]) + self.ae(conn.search('moose AND one'), []) + # }}}