tests/archive: comments: specs only
This commit is contained in:
1 parent
54f53a35f6
commit
96602286f8
33 files changed
+34
-226
No files matched your search
@@ -1,8 +1,4 @@
|
||||
-- archive/fat tests (and containers/Fat): FAT12 (1.44 MB, 720 KB) / FAT16 / FAT32 images by mkfs.fat filled by mtools
|
||||
-- (long names over several entries, lower-case 8.3, non-ASCII names, nested directories, empty and many-cluster files)
|
||||
-- and a hard-disk image with an MBR partition list what mtools extracts (names, sizes, data CRCs, dates as UTC,
|
||||
-- directories), FAT width and label; our floppies pass fsck.fat -n and extract with mtools (fixture step) and
|
||||
-- round-trip; errors; the fuzz pass. Fixtures: tools/fixtures/fat.py (images gzip-compressed).
|
||||
-- archive/fat tests (and containers/Fat) against mtools and fsck.fat (tools/fixtures/fat.py, images gzip-compressed).
|
||||
local T = require("@tests/T")
|
||||
local F = require("@rosetta")
|
||||
local FatF = require("@rosetta/archive/fat")
|
||||
@@ -38,7 +34,6 @@ end
|
||||
for _, size in { 1440, 720, 360, 2880 } do
|
||||
E.roundTrip(t, FatF, { size = size }, "round trip " .. size)
|
||||
end
|
||||
-- long and short names, directories, dates
|
||||
local a = FatF.new()
|
||||
a:add("Some Long Name.html", "a", { mtime = 1700000000 })
|
||||
a:add("dir/UPPER.TXT", "b", { mtime = 1700000002 })
|
||||
@@ -55,7 +50,6 @@ t:eq(back._byName["dir/UPPER.TXT"].mtime, 1700000002, "dos time")
|
||||
t:eq(back._byName["dir/Same Prefix 2.txt"].shortName, "SAMEPR~2.TXT", "numeric tail")
|
||||
t:eq(back.meta.label, "TEST", "label")
|
||||
|
||||
-- errors
|
||||
local function code(b: buffer): string?
|
||||
local _, e = FatF.decode(Bytes.reader(b))
|
||||
return e and e.code
|
||||
|
||||
Reference in new issue
Block a user