[Commits] (twl) Test parameters in where clause
commits at osafoundation.org
commits at osafoundation.org
Wed Sep 1 16:22:09 PDT 2004
Commit by: twl
Modified files:
chandler/repository/query/parser/tests/TestParserGrammar.py 1.5 1.6
Log message:
Test parameters in where clause
Test syntax for full text searching
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/repository/query/parser/tests/TestParserGrammar.py.diff?r1=text&tr1=1.5&r2=text&tr2=1.6
Index: chandler/repository/query/parser/tests/TestParserGrammar.py
diff -u chandler/repository/query/parser/tests/TestParserGrammar.py:1.5 chandler/repository/query/parser/tests/TestParserGrammar.py:1.6
--- chandler/repository/query/parser/tests/TestParserGrammar.py:1.5 Thu Aug 26 17:28:41 2004
+++ chandler/repository/query/parser/tests/TestParserGrammar.py Wed Sep 1 16:22:08 2004
@@ -1,5 +1,5 @@
-__revision__ = "$Revision: 1.5 $"
-__date__ = "$Date: 2004/08/27 00:28:41 $"
+__revision__ = "$Revision: 1.6 $"
+__date__ = "$Date: 2004/09/01 23:22:08 $"
__copyright__ = "Copyright (c) 2004 Open Source Applications Founation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -19,6 +19,8 @@
['fn', 'f', ['1', '2']]
>>> print parse('value_expr','x.y.z')
['path', ['x', 'y', 'z'], None]
+ >>> print parse('value_expr','$22')
+ $22
# negative tests
>>> print parse('value_expr','+')
@@ -153,6 +155,8 @@
['for', u'i', u"'//parcels/osaf/contentmodel/calendar/CalendarEvent'", [u'and', [u'>', ['path', [u'i', u'startTime'], None], ['fn', u'date', [u"'2004-08-01'"]]], [u'<', ['path', [u'i', u'startTime'], None], ['fn', u'date', [u"'2004-08-01'"]]]]]
>>> print parse('for_stmt', u"for i in '//Schema/Core/Kind' where ftcontains(i.description,'\\"howard johnson\\" and pancakes')")
['for', u'i', u"'//Schema/Core/Kind'", ['fn', u'ftcontains', [['path', [u'i', u'description'], None], u'\\'"howard johnson" and pancakes\\'']]]
+ >>> print parse('for_stmt', u"for i in ftcontains('\\"howard johnson\\" and pancakes') where i.itsKind.itsName == 'Movie'")
+ ['for', u'i', ('ftcontains', [u'\\'"howard johnson" and pancakes\\'']), [u'==', ['path', [u'i', u'itsKind', u'itsName'], None], u"'Movie'"]]
### UNION_EXPR
>>> print parse('union_stmt','union(for i in "//parcels/osaf/contentmodel/calendar/CalendarEvent" where True, for i in "//parcels/osaf/contentmodel/Note" where True, for i in "//parcels/osaf/contentmodel/contacts/Contact" where True)')
More information about the Commits
mailing list