Add a simple test for Fflush() functionality in python

- Prior to previous patch this segfaulted and tracebacked...
This commit is contained in:
Panu Matilainen 2011-07-08 14:54:42 +03:00
parent 501c6c4b20
commit d230d86168
1 changed files with 1 additions and 0 deletions

View File

@ -43,6 +43,7 @@ for iot in [ 'fpio', 'fdio', 'ufdio', 'gzdio' ]:
myprint('%s write fail' % iot) myprint('%s write fail' % iot)
if fn != fd.name: if fn != fd.name:
myprint('bad file name %s' % fd.name) myprint('bad file name %s' % fd.name)
fd.flush()
fd = rpm.fd(fn, 'r', iot) fd = rpm.fd(fn, 'r', iot)
rdata = fd.read() rdata = fd.read()
if rdata != data: if rdata != data: