diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index c7371f59859ebc..3495fc6548b425 100644 --- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -3221,5 +3221,67 @@ def test_extract_orig_with_implied_dirs(self, alpharep): zf.extractall(source_path.parent) +class StripExtraTests(unittest.TestCase): + # Note: all of the "z" characters are technically invalid, but up + # to 3 bytes at the end of the extra will be passed through as they + # are too short to encode a valid extra. + + ZIP64_EXTRA = 1 + + def test_no_data(self): + s = struct.Struct("