chore(tests): strip newlines and first line before comment len

This commit is contained in:
Erica Marigold 2025-02-23 20:04:37 +00:00
parent bd30a000ef
commit 9f9b394207
Signed by: DevComp
SSH key fingerprint: SHA256:jD3oMT4WL3WHPJQbrjC3l5feNCnkv7ndW8nYaHX5wFw

View file

@ -74,9 +74,10 @@ return function(test: typeof(frktest.test))
local unzipResult = process.spawn("unzip", { "-z", "tests/data/max_comment_size.zip" }) local unzipResult = process.spawn("unzip", { "-z", "tests/data/max_comment_size.zip" })
assert(unzipResult.ok) assert(unzipResult.ok)
print(#unzipResult.stdout, #zip.comment) local commentData = assert(string.match(unzipResult.stdout, "\n(.*)\n"))
-- Check that the comment is the same as the one in the ZIP file (only compare hashes) -- Check that the comment is the same as the one in the ZIP file (only compare hashes)
check.equal(serde.hash("blake3", unzipResult.stdout), serde.hash("blake3", zip.comment)) check.equal(serde.hash("blake3", commentData), serde.hash("blake3", zip.comment))
end) end)
end) end)
end end