Update of /cvsroot/pywin32/pywin32/win32/test
In directory sc8-pr-cvs1:/tmp/cvs-serv26705
Modified Files:
test_win32api.py
Log Message:
Add FormatMessage test.
Index: test_win32api.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32api.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_win32api.py 23 Oct 2003 01:21:09 -0000 1.5
--- test_win32api.py 8 Nov 2003 12:37:16 -0000 1.6
***************
*** 80,83 ****
--- 80,94 ----
"Expected long name ('%s') to be original name ('%s')" % (long_name, fname))
+ class FormatMessage(unittest.TestCase):
+ def test_FromString(self):
+ msg = "Hello %1, how are you %2?"
+ inserts = ["Mark", "today"]
+ result = win32api.FormatMessage(win32con.FORMAT_MESSAGE_FROM_STRING,
+ msg, # source
+ 0, # ID
+ 0, # LangID
+ inserts)
+ self.assertEqual(result, "Hello Mark, how are you today?")
+
if __name__ == '__main__':
unittest.main()
|