From b43e21baba0062076534063f57169ad26dce2225 Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 13 Jan 2020 11:22:42 -0300 Subject: [PATCH] Test fix for Palette:setEntry() when alpha channel is involved --- scripts/palette.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/palette.lua b/scripts/palette.lua index 9a65b451a..6a22abfc1 100644 --- a/scripts/palette.lua +++ b/scripts/palette.lua @@ -29,6 +29,12 @@ do assert(p:getColor(1) == Color(250, 4, 30)) assert(p:getColor(2) == Color(240, 3, 20)) assert(p:getColor(3) == Color(210, 2, 10)) + + -- Check alpha + local c = Color{red=100, green=50, blue=10, alpha=128} + p:setColor(3, c) + assert(p:getColor(3) == c) + assert(p:getColor(3).alpha == 128) end -- Load/save