mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Add test for https://github.com/aseprite/aseprite/issues/2380
This commit is contained in:
parent
2df9614ac6
commit
e73a30057b
15
cli/sheet.sh
15
cli/sheet.sh
@ -301,3 +301,18 @@ for i = 1,#data1.frames do
|
||||
end
|
||||
EOF
|
||||
$ASEPRITE -b -script "$d/compare.lua" || exit 1
|
||||
|
||||
# https://github.com/aseprite/aseprite/issues/2380
|
||||
# Check that -split-layers and -list-layers include group information
|
||||
d=$t/issue-2380
|
||||
$ASEPRITE -b -trim -all-layers "sprites/groups3abc.aseprite" -data "$d/sheet1.json" -format json-array -sheet "$d/sheet1.png" -list-layers
|
||||
$ASEPRITE -b -trim -all-layers -split-layers "sprites/groups3abc.aseprite" -data "$d/sheet2.json" -format json-array -sheet "$d/sheet2.png" -list-layers
|
||||
cat >$d/check.lua <<EOF
|
||||
local json = dofile('third_party/json/json.lua')
|
||||
local sheet1 = json.decode(io.open('$d/sheet1.json'):read('a'))
|
||||
local sheet2 = json.decode(io.open('$d/sheet2.json'):read('a'))
|
||||
assert(#sheet1.meta.layers == 12)
|
||||
assert(#sheet2.meta.layers == 12)
|
||||
assert(json.encode(sheet1.meta.layers) == json.encode(sheet2.meta.layers))
|
||||
EOF
|
||||
$ASEPRITE -b -script "$d/check.lua" || exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user