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 -6
View File
@@ -1,7 +1,4 @@
-- archive/rpm tests: one package from rpmbuild with each payload compressor (gzip, bzip2, xz, lzma, zstd, none) gives
-- the header fields `rpm -qp --qf` prints, its file list (names, sizes, modes, mtimes, symlink targets; %ghost files
-- skipped), the file data rpm2cpio's stream holds (CRCs, hard links), and Rpm.cpio = rpm2cpio's bytes; errors; the
-- fuzz pass. Fixtures: tools/fixtures/rpm.py.
-- archive/rpm tests against rpm -qp and rpm2cpio (tools/fixtures/rpm.py).
local T = require("@tests/T")
local F = require("@rosetta")
local Rpm = require("@rosetta/archive/rpm")
@@ -48,7 +45,6 @@ for _, c in Fx.rpms do
end
end
t:eq(#a:list(), n, c.name .. ": entry count")
-- hard links: both read the same bytes
t:eq(buffer.tostring(a:read("usr/bin/hello")), "#!/bin/sh\necho hello\n", c.name .. ": hard link (first)")
t:eq(buffer.tostring(a:read("usr/bin/hello2")), "#!/bin/sh\necho hello\n", c.name .. ": hard link (second)")
local raw = Rpm.cpio(Bytes.reader(buffer.fromstring(c.data)))
@@ -67,7 +63,6 @@ do
t:check(e, "rpm is read-only")
end
-- errors
do
local good = Fx.rpms[1].data
local _, e1 = Rpm.decode(Bytes.reader(buffer.fromstring(string.sub(good, 1, 50))))