mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
add test coverage for previous commit
This commit is contained in:
parent
d50bae4da9
commit
09d021c908
@ -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…
x
Reference in New Issue
Block a user