summaryrefslogtreecommitdiff
path: root/Lib/test/test_tarfile.py
diff options
context:
space:
mode:
authorLars Gustäbel <lars@gustaebel.de>2008-02-11 18:36:07 +0000
committerLars Gustäbel <lars@gustaebel.de>2008-02-11 18:36:07 +0000
commit08303dbd722f379e17682daaaf60ad515e1800fb (patch)
treeb2690f937e86cfe99d1a611aeebad5413cf2c7f9 /Lib/test/test_tarfile.py
parent5ca1cba2523645b6043adf5c59bb448b8d22d816 (diff)
downloadcpython-git-08303dbd722f379e17682daaaf60ad515e1800fb.tar.gz
Backport the nts() function from the trunk. This fixes problems with
the xstar format that puts extra fields inside the space that POSIX has reserved for the prefix field.
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r--Lib/test/test_tarfile.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index dc2803895d..a9797aeb99 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -26,7 +26,7 @@ def path(path):
testtar = path("testtar.tar")
tempdir = os.path.join(tempfile.gettempdir(), "testtar" + os.extsep + "dir")
tempname = test_support.TESTFN
-membercount = 12
+membercount = 13
def tarname(comp=""):
if not comp:
@@ -225,6 +225,12 @@ class ReadTest(BaseTest):
self.assertEqual(tarinfo.mtime, os.path.getmtime(path))
tar.close()
+ def test_star(self):
+ try:
+ self.tar.getmember("7-STAR")
+ except KeyError:
+ self.fail("finding 7-STAR member failed (mangled prefix?)")
+
class ReadStreamTest(ReadTest):
sep = "|"