[Commits] (twl) Add test for union

commits at osafoundation.org commits at osafoundation.org
Thu Aug 19 17:13:25 PDT 2004


Commit by: twl
Modified files:
chandler/repository/query/parser/tests/TestParserGrammar.py 1.2 1.3

Log message:
Add test for union


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/repository/query/parser/tests/TestParserGrammar.py.diff?r1=text&tr1=1.2&r2=text&tr2=1.3

Index: chandler/repository/query/parser/tests/TestParserGrammar.py
diff -u chandler/repository/query/parser/tests/TestParserGrammar.py:1.2 chandler/repository/query/parser/tests/TestParserGrammar.py:1.3
--- chandler/repository/query/parser/tests/TestParserGrammar.py:1.2	Wed Aug 11 11:45:11 2004
+++ chandler/repository/query/parser/tests/TestParserGrammar.py	Thu Aug 19 17:13:24 2004
@@ -1,5 +1,5 @@
-__revision__  = "$Revision: 1.2 $"
-__date__      = "$Date: 2004/08/11 18:45:11 $"
+__revision__  = "$Revision: 1.3 $"
+__date__      = "$Date: 2004/08/20 00:13:24 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Founation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -144,6 +144,10 @@
   ['for', 'i', 'z', ['and', ['<', ['path', ['i', 'price'], None], '10'], ['==', ['path', ['i', 'color'], None], '"green"']]]
   >>> print parse('for_stmt', 'for i in z where len(z.messages) > 1000')
   ['for', 'i', 'z', ['>', ['fn', 'len', [['path', ['z', 'messages'], None]]], '1000']]
+
+  ### 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)')
+  ['union', [['for', 'i', '"//parcels/osaf/contentmodel/calendar/CalendarEvent"', 'True'], ['for', 'i', '"//parcels/osaf/contentmodel/Note"', 'True'], ['for', 'i', '"//parcels/osaf/contentmodel/contacts/Contact"', 'True']]]
   """
   pass
 



More information about the Commits mailing list