setup

create stack "Test1"

set the script of stack "Test1" to "on releaseStack;global tVar;put true into tVar; end releaseStack"

global tVar

start using stack "Test1"

stop using stack "Test1"

test tVar

close stack "Test1"

teardown
