diff --git a/zstd_bullk_test.go b/zstd_bullk_test.go index b3a501d..7b506bc 100644 --- a/zstd_bullk_test.go +++ b/zstd_bullk_test.go @@ -98,7 +98,7 @@ func TestBulkEmptyOrNilDictionary(t *testing.T) { } } -func TestBulkCompressEmptyOrNilContent(t *testing.T) { +func TestBulkCompressDecompressEmptyOrNilContent(t *testing.T) { p := newBulkProcessor(t, dict, BestSpeed) compressed, err := p.Compress(nil, nil) if err != nil { @@ -115,6 +115,14 @@ func TestBulkCompressEmptyOrNilContent(t *testing.T) { if len(compressed) < 4 { t.Error("magic number doesn't exist") } + + decompressed, err := p.Decompress(nil, compressed) + if err != nil { + t.Error("failed to decompress") + } + if len(decompressed) != 0 { + t.Error("content was not decompressed correctly") + } } func TestBulkCompressIntoGivenDestination(t *testing.T) {