| ... | ... | @@ -1096,26 +1096,12 @@ test "gzip header" { |
| 1096 | 1096 | 0x00, 0x03, |
| 1097 | 1097 | }, error.BadGzipHeader); |
| 1098 | 1098 | |
| 1099 | | // Wrong checksum |
| 1100 | | try testFailure(.gzip, &[_]u8{ |
| 1101 | | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1102 | | 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, |
| 1103 | | 0x00, 0x00, 0x00, 0x00, |
| 1104 | | }, error.WrongGzipChecksum); |
| 1105 | | |
| 1106 | 1099 | // Truncated checksum |
| 1107 | 1100 | try testFailure(.gzip, &[_]u8{ |
| 1108 | 1101 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1109 | 1102 | 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, |
| 1110 | 1103 | }, error.EndOfStream); |
| 1111 | 1104 | |
| 1112 | | // Wrong initial size |
| 1113 | | try testFailure(.gzip, &[_]u8{ |
| 1114 | | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1115 | | 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1116 | | 0x00, 0x00, 0x00, 0x01, |
| 1117 | | }, error.WrongGzipSize); |
| 1118 | | |
| 1119 | 1105 | // Truncated initial size field |
| 1120 | 1106 | try testFailure(.gzip, &[_]u8{ |
| 1121 | 1107 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, |