bug [ 728515 ] mmap's resize method resizes the file in win32 but not unix

This commit is contained in:
Georg Brandl 2005-08-24 07:17:40 +00:00
parent 76fb6d84d0
commit 38387b8b91
4 changed files with 23 additions and 1 deletions

View file

@ -120,6 +120,14 @@ def test_both():
else:
verify(0, 'Could seek beyond the new size')
# Check that the underlying file is truncated too
# (bug #728515)
f = open(TESTFN)
f.seek(0, 2)
verify(f.tell() == 512, 'Underlying file not truncated')
f.close()
verify(m.size() == 512, 'New size not reflected in file')
m.close()
finally: