pykd/test/scripts/diatest.py
SND\EreTIk_cp 03e052a418 [+] pyDia: find[Ex] tests
git-svn-id: https://pykd.svn.codeplex.com/svn@69934 9b283d60-5439-405e-af05-b73fd8c4d996
2017-11-08 17:06:26 +04:00

24 lines
574 B
Python

"""
Tests for pyDia
"""
import unittest
import target
import pykd
class DiaTest( unittest.TestCase ):
def testFind(self):
globalScope = pykd.diaOpenPdb( str(target.module.pdb()) )
self.assertNotEqual(0, len(globalScope))
symFunction = globalScope.find("FuncWithName0")
self.assertTrue(1 == len( symFunction ))
symFunction = globalScope.findEx(pykd.SymTagNull,
"FuNc*Name?",
pykd.nsCaseInRegularExpression)
self.assertTrue(len(symFunction) > 1)