tests/archive: comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:49:50 -05:00
1 parent 54f53a35f6
commit 96602286f8
33 files changed
+34 -226

No files matched your search

+1 -4
View File
@@ -1,6 +1,4 @@
-- archive/bz2 tests: the contract, sniff, a .bz2 as a one-entry single-stream archive (entry named after the file),
-- the api path (F.load by sniff, .tar.bz2 unwrap is the api's: covered once tar exists), errors, the fuzz pass.
-- Fixtures: tools/fixtures/bzip2.py.
-- archive/bz2 tests (tools/fixtures/bzip2.py).
local T = require("@tests/T")
local Bz2 = require("@rosetta/archive/bz2")
local Bytes = require("@rosetta/core/Bytes")
@@ -44,7 +42,6 @@ do
t:eq(a2:list()[1].name, "x.tar", ".tbz2 -> .tar")
local a3 = Bz2.decode(Bytes.reader(buffer.fromstring(c.data)))
t:eq(a3:list()[1].name, "data", "no name -> data")
-- through the api
local v, ferr = F.load(c.data)
t:check(v and v.kind == "archive" and v.format == "bz2", "F.load sniffs bz2: " .. tostring(ferr))
t:eq(F.detect(c.data), "bz2", "F.detect")