summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_mmap.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index 0b9cea9..849f170 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -356,6 +356,22 @@ def test_both():
finally:
os.unlink(TESTFN)
+ # make move works everywhere (64-bit format problem earlier)
+ f = open(TESTFN, 'w+')
+
+ try: # unlink TESTFN no matter what
+ f.write("ABCDEabcde") # Arbitrary character
+ f.flush()
+
+ mf = mmap.mmap(f.fileno(), 10)
+ mf.move(5, 0, 5)
+ verify(mf[:] == "ABCDEABCDE", "Map move should have duplicated front 5")
+ mf.close()
+ f.close()
+
+ finally:
+ os.unlink(TESTFN)
+
print ' Test passed'
test_both()