| ... | @@ -1096,26 +1096,12 @@ test "gzip header" { | ... | @@ -1096,26 +1096,12 @@ test "gzip header" { |
| 1096 | 0x00, 0x03, | 1096 | 0x00, 0x03, |
| 1097 | }, error.BadGzipHeader); | 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 | // Truncated checksum | 1099 | // Truncated checksum |
| 1107 | try testFailure(.gzip, &[_]u8{ | 1100 | try testFailure(.gzip, &[_]u8{ |
| 1108 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, | 1101 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 1109 | 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, | 1102 | 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, |
| 1110 | }, error.EndOfStream); | 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 | // Truncated initial size field | 1105 | // Truncated initial size field |
| 1120 | try testFailure(.gzip, &[_]u8{ | 1106 | try testFailure(.gzip, &[_]u8{ |
| 1121 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, | 1107 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, |