diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index 21257785159b37a..814c222f8f53c35 100644 --- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -3424,6 +3424,58 @@ def test_cli_with_metadata_encoding_extract(self): for name in self.file_names: self.assertIn(name, listing) +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. + def test_no_data(self): + s = struct.Struct("