mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
add test coverage for previous commit
This commit is contained in:
parent
d50bae4da9
commit
09d021c908
1 changed files with 10 additions and 0 deletions
|
|
@ -87,3 +87,13 @@ test "too small uncompressed size in header" {
|
|||
@embedFile("testdata/bad-too_small_size-without_eopm-3.lzma"),
|
||||
);
|
||||
}
|
||||
|
||||
test "reading one byte" {
|
||||
const compressed = @embedFile("testdata/good-known_size-with_eopm.lzma");
|
||||
var stream = std.io.fixedBufferStream(compressed);
|
||||
var decompressor = try lzma.decompress(std.testing.allocator, stream.reader());
|
||||
defer decompressor.deinit();
|
||||
|
||||
var buffer = [1]u8{0};
|
||||
_ = try decompressor.read(buffer[0..]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue