Update of /cvsroot/pywin32/pywin32/com/win32com/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24878/win32com/test
Modified Files:
testShell.py
Log Message:
Do some basic validity checks when converting a buffer to a PIDL.
Index: testShell.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testShell.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** testShell.py 10 Jan 2006 06:32:58 -0000 1.8
--- testShell.py 12 Jul 2006 12:15:30 -0000 1.9
***************
*** 81,84 ****
--- 81,92 ----
self._rtCIDA(["\0"], [ ["\0"], ["\1"], ["\2"] ])
+ def testBadShortPIDL(self):
+ # A too-short child element: cb pidl cb
+ pidl = "\01\00" "\1"
+ self.assertRaises(ValueError, shell.StringAsPIDL, pidl)
+
+ # ack - tried to test too long PIDLs, but a len of 0xFFFF may not
+ # always fail.
+
class FILEGROUPDESCRIPTORTester(win32com.test.util.TestCase):
def _testRT(self, fd):
|