Test crash saving palette to .jpg file

Test for the following patch:
341408e902
This commit is contained in:
David Capello 2021-09-02 17:48:06 -03:00
parent 691ea0b5f8
commit 36ee80aaca

View File

@ -85,3 +85,15 @@ do
spr:setPalette(db32)
assert(sprPal == db32)
end
-- Test crash
do
local p = Palette{ fromResource="DB32" }
p:saveAs("_test_.jpg")
local q = Palette{ fromFile="_test_.gpl" }
assert(#p == #q)
for i=0,#q-1 do
assert(p:getColor(i) == q:getColor(i))
end
end