luau-unzip/tests/misaligned_comment.luau
2025-01-07 13:29:39 +00:00

17 lines
No EOL
518 B
Text

local fs = require("@lune/fs")
local frktest = require("../lune_packages/frktest")
local check = frktest.assert.check
local ZipReader = require("../lib")
return function(test: typeof(frktest.test))
test.suite("ZIP extraction tests", function()
test.case("Handles misaligned comment properly", function()
local data = fs.readFile("tests/data/misaligned_comment.zip")
local zip = ZipReader.load(buffer.fromstring(data))
check.equal(zip.comment, "short.")
end)
end)
end