There was an error while loading. Please reload this page.
1 parent 52b2be0 commit 43e66d5Copy full SHA for 43e66d5
1 file changed
Lib/test/test_tarfile.py
@@ -1621,6 +1621,22 @@ def test_symlink_size(self):
1621
finally:
1622
os_helper.unlink(path)
1623
1624
+ @os_helper.skip_unless_symlink
1625
+ def test_symlink_target_normalization(self):
1626
+ # Test for gh-151669.
1627
+ path = os.path.join(TEMPDIR, "symlink")
1628
+ target = "subdir/link/target"
1629
+ os.symlink(target.replace("/", os.sep), path)
1630
+ try:
1631
+ tar = tarfile.open(tmpname, self.mode)
1632
1633
+ tarinfo = tar.gettarinfo(path)
1634
+ self.assertEqual(tarinfo.linkname, target)
1635
+ finally:
1636
+ tar.close()
1637
1638
+ os_helper.unlink(path)
1639
+
1640
def test_add_self(self):
1641
# Test for #1257255.
1642
dstname = os.path.abspath(tmpname)
0 commit comments