[Python-checkins] r60733 - python/trunk/Lib/test/test_tarfile.py python/trunk/Lib/test/testtar.tar
lars.gustaebel
python-checkins at python.org
Mon Feb 11 20:17:10 CET 2008
Author: lars.gustaebel
Date: Mon Feb 11 20:17:10 2008
New Revision: 60733
Modified:
python/trunk/Lib/test/test_tarfile.py
python/trunk/Lib/test/testtar.tar
Log:
Make sure that xstar headers are read correctly.
Modified: python/trunk/Lib/test/test_tarfile.py
==============================================================================
--- python/trunk/Lib/test/test_tarfile.py (original)
+++ python/trunk/Lib/test/test_tarfile.py Mon Feb 11 20:17:10 2008
@@ -208,6 +208,15 @@
self.assert_(tarinfo.type == tarfile.DIRTYPE,
"v7 dirtype failed")
+ def test_xstar_type(self):
+ # The xstar format stores extra atime and ctime fields inside the
+ # space reserved for the prefix field. The prefix field must be
+ # ignored in this case, otherwise it will mess up the name.
+ try:
+ self.tar.getmember("misc/regtype-xstar")
+ except KeyError:
+ self.fail("failed to find misc/regtype-xstar (mangled prefix?)")
+
def test_check_members(self):
for tarinfo in self.tar:
self.assert_(int(tarinfo.mtime) == 07606136617,
Modified: python/trunk/Lib/test/testtar.tar
==============================================================================
Binary files. No diff available.
More information about the Python-checkins
mailing list