From bec0e1cb903e47c27f03a59b8b532ec615af26f9 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Tue, 24 Mar 2009 11:48:45 +0000 Subject: [PATCH] Add a test for query generation from a syntax tree containing a "not" operator. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26141 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ZSQLCatalog/tests/testSQLCatalog.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/product/ZSQLCatalog/tests/testSQLCatalog.py b/product/ZSQLCatalog/tests/testSQLCatalog.py index f79083458a..e5048737ee 100644 --- a/product/ZSQLCatalog/tests/testSQLCatalog.py +++ b/product/ZSQLCatalog/tests/testSQLCatalog.py @@ -352,6 +352,12 @@ class TestSQLCatalog(unittest.TestCase): {'keyword': '<"=a OR =b"'}) self.catalog(ReferenceQuery(ReferenceQuery(operator='like', keyword='%"a" OR "b"%'), operator='and'), {'keyword': '"\\"a\\" OR \\"b\\""'}) + self.catalog(ReferenceQuery(ReferenceQuery(ReferenceQuery(operator='match', fulltext='a'), + ReferenceQuery(ReferenceQuery(operator='match', fulltext='b'), operator='not'), operator='or'), operator='and'), + {'fulltext': 'a NOT b'}) + self.catalog(ReferenceQuery(ReferenceQuery(ReferenceQuery(operator='match', fulltext='a'), + ReferenceQuery(ReferenceQuery(operator='match', fulltext='b'), operator='not'), operator='and'), operator='and'), + {'fulltext': 'a AND NOT b'}) def test_006_testRelatedKey_with_multiple_join(self): # The name of catalog parameter does not matter at all -- 2.30.9