Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit c0f3485

Browse files
committed
[21500] Added tests
1 parent d4fcb19 commit c0f3485

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
script "_ungroupandquit"
2+
on startup
3+
create button "one"
4+
create button "two"
5+
group button "one" and button "two"
6+
ungroup the last group
7+
quit 0
8+
end startup

tests/lcs/core/engine/engine.livecodescript

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,3 +501,19 @@ wait 2 ticks
501501
TestAssert "the ticks change with time", the ticks - tTime >= 2
502502
end TestTicks
503503

504+
on TestUngroupAndQuit
505+
-- Bug 21500: run a subprocess in which we ungroup a group and
506+
-- then quit, to test that it no longer crashes
507+
local tStackToRun, tOptions
508+
put the effective filename of me into tStackToRun
509+
set the itemdelimiter to slash
510+
if the environment is not "server" then
511+
put "_ungroupandquit.livecodescript" into item -1 of tStackToRun
512+
if the environment contains "command line" then
513+
put "-ui" into tOptions
514+
end if
515+
end if
516+
TestRunStack tOptions, tStackToRun
517+
TestAssert "ungroup does not crash on quit", the result is empty
518+
end TestUngroupAndQuit
519+

0 commit comments

Comments
 (0)