[Zope3-checkins] CVS: Zope3/src/zope/app/traversing/tests - test_conveniencefunctions.py:1.14

Sidnei da Silva sidnei@x3ng.com.br
Mon, 31 Mar 2003 08:32:07 -0500


Update of /cvs-repository/Zope3/src/zope/app/traversing/tests
In directory cvs.zope.org:/tmp/cvs-serv7402/src/zope/app/traversing/tests

Modified Files:
	test_conveniencefunctions.py 
Log Message:
Slight modification to joinPath, with tests.

=== Zope3/src/zope/app/traversing/tests/test_conveniencefunctions.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/traversing/tests/test_conveniencefunctions.py:1.13	Mon Mar 24 11:42:22 2003
+++ Zope3/src/zope/app/traversing/tests/test_conveniencefunctions.py	Mon Mar 31 08:32:06 2003
@@ -286,6 +286,24 @@
                                  "failure on %s" % argument)
 
 
+    def testJoinPathDoubleSlash(self):
+        from zope.app.traversing import joinPath
+        path = u'/'
+        args = ('/test', 'bla', '/foo/', '/bar')
+        self.assertEqual(joinPath(path, *args), u'/test/bla/foo/bar')
+        
+    def testJoinPathMultipleArgs(self):
+        from zope.app.traversing import joinPath
+        path = u'/bla/'
+        args = ('foo', 'bar', 'baz', 'bone')
+        self.assertEqual(joinPath(path, *args), u'/bla/foo/bar/baz/bone')
+
+    def testJoinPathNoSlash(self):
+        from zope.app.traversing import joinPath
+        path = u'bla'
+        args = ('foo', 'bar', 'baz', 'bone')
+        self.assertEqual(joinPath(path, *args), u'bla/foo/bar/baz/bone')
+
 def test_suite():
     return makeSuite(Test)