[Erp5-report] r20809 - in /erp5/trunk/products/ZSQLCatalog: SearchKey/ tests/
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Apr 25 10:18:09 CEST 2008
Author: nicolas
Date: Fri Apr 25 10:18:08 2008
New Revision: 20809
URL: http://svn.erp5.org?rev=20809&view=rev
Log:
Fix unparsed DoubleQuote bug in regex, extend unit_test
Modified:
erp5/trunk/products/ZSQLCatalog/SearchKey/FullTextKey.py
erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py
Modified: erp5/trunk/products/ZSQLCatalog/SearchKey/FullTextKey.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SearchKey/FullTextKey.py?rev=20809&r1=20808&r2=20809&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SearchKey/FullTextKey.py (original)
+++ erp5/trunk/products/ZSQLCatalog/SearchKey/FullTextKey.py Fri Apr 25 10:18:08 2008
@@ -58,7 +58,7 @@
t_DOUBLEQUOTE = r'(\")'
def t_WORD(self, t):
- r'[^\+\-<>\(\)\~\*\"\s]$|[^\+\-<>\(\)\~\*\s]+[^\*\s\)]'
+ r'[^\+\-<>\(\)\~\*\"\s]$|[^\+\-<>\(\)\~\*\"\s]+[^\*\"\s\)]'
#r'[^\+\-<>\(\)\~\*\"\s]\S*'
#r'[\x7F-\xFF\w\d][\x7F-\xFF\w\d]*'
# WORD may contain arbitrary letters and numbers without white space
Modified: erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py?rev=20809&r1=20808&r2=20809&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py (original)
+++ erp5/trunk/products/ZSQLCatalog/tests/testSearchKeys.py Fri Apr 25 10:18:08 2008
@@ -134,6 +134,7 @@
self.compare(FullTextKey, '+John -Doe',
('PLUS', 'WORD', 'MINUS', 'WORD',))
self.compare(FullTextKey, '.', ('WORD',))
+ self.compare(FullTextKey, '"John Doe"', ('DOUBLEQUOTE', 'WORD', 'WORD', 'DOUBLEQUOTE'))
self.compare(FullTextKey, 'John*', ('WORD', 'ASTERISK'))
self.compare(FullTextKey, '+apple +(>turnover <strudel)',
('PLUS', 'WORD', 'PLUS', 'LEFTPARENTHES', 'GREATERTHAN', 'WORD',
More information about the Erp5-report
mailing list