diff --git a/Lib/test/test_zipfile/test_core.py b/Lib/test/test_zipfile/test_core.py index cf41d0e8cb8d53..1877fb5d796fcc 100644 --- a/Lib/test/test_zipfile/test_core.py +++ b/Lib/test/test_zipfile/test_core.py @@ -3009,6 +3009,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("