aseprite/tests
Gaspar Capello 4a91d150af Fix transparent color is possible on opaque sprites (fix #4370)
To reproduce the error before this fix on RGBA/Grayscale Color Mode:
- New 100x100 RGBA/Grayscale opaque sprite (white background).
- Draw something with some gray color in the palette.
- Keep the selected gray color as primary color.
- Configure as secondary color the mask color (#000000 alpha=0).
- Pick 'eraser' tool and erase over the gray color with right click.
- Result: The sprite doesn't look more opaque, which is wrong. Also,
  if we export this sprite, the transparent parts will turn black.

A similar problem occurs in Indexed Color Mode, but getting a
transparent color in a Background sprite is inevitable if the color of
a palette entry is transparent or semi-transparent, since the index
must be set as is. This could be fixed in the future at the
render stage, however, this could lead to other perceived
inconsistencies. For now it'll be left as is.

Original issue description:
Downloaded PNG in RGB mode fails to support transparency: erase
uses secondary color and export PNG replaces transparent color
with black

Added tests for 'eraser' in 'Replace Color Mode'
To make the eraser work in 'Replace Color Mode' within the tests,
was implemented the possibility of using the right button in
the creation of the point vector.

During testing with UI available it was observed that the 'bg' color
was copied from the 'fg'. Changed this to be compatible with the way
the default value of 'fg' is assigned when it is not specified.
This last modification resulted in errors during 'tilemap.lua' due to
incompatibility of the type of 'bg' color. This was corrected
considering the color type of 'fg' color.
Furthermore, it was found that the command 'app.range.tiles = { 1 }'
did not finish assigning the tile picks to the activeSite,
then 'assert(1, #app.range.tiles)' was failing. This was fixed too.
2024-09-03 19:08:15 -03:00
..
cli Add --play-subtags CLI test 2024-05-28 15:00:22 -03:00
scripts Fix transparent color is possible on opaque sprites (fix #4370) 2024-09-03 19:08:15 -03:00
sprites Add --play-subtags CLI test 2024-05-28 15:00:22 -03:00
LICENSE.txt [lua] Add short field names (fix #3815, fix #3816) 2023-04-19 13:48:15 -03:00
README.md Fix instructions/paths for CLI tests 2022-10-25 15:57:31 -03:00
run-tests.sh Merge remote-tracking branch 'tests/main' 2022-10-25 15:30:38 -03:00

Aseprite Tests

Test suite for Aseprite to avoid breaking backward compatibility.

This directory is cloned by the build.yml action to run several automated tests after Aseprite is compiled:

How to run tests?

You have to set the ASEPRITE environment variable pointing to the Aseprite executable and then run run-tests.sh from Bash:

export ASEPRITE=$HOME/your-aseprite-build/bin/aseprite
cd tests
bash run-tests.sh

You can filter some tests with a regex giving a parameter to run-tests.sh, for example:

run-tests.sh color

Should run all tests which have the color word in their name.