tests/model: comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:50:23 -05:00
1 parent 5f7f6005f6
commit fe7566cbba
37 files changed
+72 -440

No files matched your search

+1 -7
View File
@@ -1,7 +1,4 @@
-- model/mca tests: region files with 1.18+ chunks (each compression: zlib, gzip, stored, LZ4 block streams),
-- 1.16 / 1.13 / 1.12 chunks (palettes non-spanning and spanning, numeric ids with Add nibbles) and an external .mcc
-- chunk: every cell of the assembled grid against the fixture (a CRC of the cell texts), placement, the chunk list,
-- block entities, opts.chunks / opts.area / maxCells, Mca.list / Mca.chunk, detection, errors and the fuzz pass.
-- model/mca tests: region files of every chunk version and compression against the fixture's cell texts.
-- Fixtures: tools/fixtures/mca.py.
local T = require("@tests/T")
local F = require("@rosetta")
@@ -85,7 +82,6 @@ for _, c in Fx.regions do
t:check(air > 0 and air < buffer.len(v.data), c.name .. ": colour grid")
end
-- details on the 1.18+ region
do
local c = Fx.regions[1]
local list = assert(Mca.list(reader(c.data)))
@@ -94,7 +90,6 @@ do
t:check(nbt and nbt.xPos == 3 and nbt.Status == "minecraft:full", "Mca.chunk")
t:eq(comp, "lz4", "Mca.chunk compression")
t:eq(Mca.chunk(reader(c.data), 9, 9), nil, "absent chunk")
-- only some chunks / an area
local one = assert(Mca.decode(reader(c.data), { chunks = { { 1, 0 } }, keepNbt = false }))
t:eq(table.concat((one.voxels :: { Types.Voxels })[1].size, ","), "16,48,16", "opts.chunks")
t:eq(one.meta.source.chunks[1].nbt, nil, "keepNbt = false")
@@ -128,7 +123,6 @@ do
t:check(F.save(viaApi, nil, { format = "schem" }) ~= nil, "region -> .schem")
end
-- errors
do
local ext = Fx.regions[3]
local _, e1 = Mca.decode(reader(ext.data))