[ZPT] CVS: Releases/Zope/lib/python/Products/PageTemplates/tests - testExpressions.py:1.9.6.2

Evan Simpson evan@zope.com
Thu, 26 Sep 2002 17:35:18 -0400


Update of /cvs-repository/Releases/Zope/lib/python/Products/PageTemplates/tests
In directory cvs.zope.org:/tmp/cvs-serv8005/lib/python/Products/PageTemplates/tests

Modified Files:
      Tag: Zope-2_6-branch
	testExpressions.py 
Log Message:
Merge fix for Collector #538 from trunk.


=== Releases/Zope/lib/python/Products/PageTemplates/tests/testExpressions.py 1.9.6.1 => 1.9.6.2 ===
--- Releases/Zope/lib/python/Products/PageTemplates/tests/testExpressions.py:1.9.6.1	Wed Sep 25 19:20:09 2002
+++ Releases/Zope/lib/python/Products/PageTemplates/tests/testExpressions.py	Thu Sep 26 17:35:17 2002
@@ -43,6 +43,15 @@
         assert ec.evaluate('d/ | nothing') == 'blank'
         assert ec.evaluate('d/?blank') == 'blank'
 
+    def testHybrid(self):
+        '''Test hybrid path expressions'''
+        ec = self.ec
+        assert ec.evaluate('x | python:1+1') == 2
+        assert ec.evaluate('x | python:int') == int
+        assert ec.evaluate('x | string:x') == 'x'
+        assert ec.evaluate('x | string:$one') == '1'
+        assert ec.evaluate('x | not:exists:x')
+
 def test_suite():
     return unittest.makeSuite(ExpressionTests)