Mercurial > octave
changeset 33585:a079e8d8bef7 bytecode-interpreter
maint: Merge default to bytecode-interpreter
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Tue, 14 May 2024 15:35:10 -0400 |
parents | 80346999b171 (current diff) 3fe954c2fd25 (diff) |
children | 8a833798c741 |
files | |
diffstat | 1 files changed, 42 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/test/bug-53027/bug-53027.tst Mon May 13 11:33:36 2024 +0200 +++ b/test/bug-53027/bug-53027.tst Tue May 14 15:35:10 2024 -0400 @@ -15,42 +15,57 @@ %! global X; %! X = 0; %! fname = tempname (); -%! save53027 (fname); -%! assert (X, 1); -%! load53027 (fname); -%! assert (X, 1); -%! load53027 (fname); -%! assert (X, 1); -%! clear X -%! assert (exist ("X"), 0); -%! clear -global X; # cleanup after test -%! unlink (fname); # remove temp file +%! unwind_protect +%! save53027 (fname); +%! assert (X, 1); +%! load53027 (fname); +%! assert (X, 1); +%! load53027 (fname); +%! assert (X, 1); +%! clear X +%! assert (exist ("X"), 0); +%! unwind_protect_cleanup +%! clear -global X +%! unlink (fname); # remove temp file +%! end_unwind_protect %!test <*53027> %! [a, b] = ntest53027a (); -%! assert ([a, b], [0, 0]) -%! clear -global x; # cleanup after test +%! unwind_protect +%! assert ([a, b], [0, 0]); +%! unwind_protect_cleanup +%! clear -global x +%! end_unwind_protect %!test <*53027> %! [a, b] = ntest53027b (); -%! assert ([a, b], [0, 0]) -%! clear -global x; # cleanup after test +%! unwind_protect +%! assert ([a, b], [0, 0]); +%! unwind_protect_cleanup +%! clear -global x +%! end_unwind_protect %!test <*53027> %! [a, b] = ntest53027c (); -%! assert ([a, b], [0, 0]) -%! clear -global x; # cleanup after test +%! unwind_protect +%! assert ([a, b], [0, 0]); +%! unwind_protect_cleanup +%! clear -global x +%! end_unwind_protect ## Previous bugs have caused segfaults when executing script twice. %!test <*53027> -%! gtest53027 -%! assert (isempty (a) && isempty (c)) -%! assert (isglobal ("a") && isglobal ("c")) -%! assert (! exist ("b")) -%! assert (isempty (xx) && ! isglobal ("xx")) -%! gtest53027 -%! assert (isempty (a) && isempty (c)) -%! assert (isglobal ("a") && isglobal ("c")) -%! assert (! exist ("b")) -%! assert (isempty (xx) && ! isglobal ("xx")) -%! clear -global a b c; +%! unwind_protect +%! gtest53027 +%! assert (isempty (a) && isempty (c)); +%! assert (isglobal ("a") && isglobal ("c")); +%! assert (! exist ("b")); +%! assert (isempty (xx) && ! isglobal ("xx")); +%! gtest53027 +%! assert (isempty (a) && isempty (c)); +%! assert (isglobal ("a") && isglobal ("c")); +%! assert (! exist ("b")); +%! assert (isempty (xx) && ! isglobal ("xx")); +%! unwind_protect_cleanup +%! clear -global a b c +%! end_unwind_protect