# HG changeset patch # User Rik # Date 1669597428 28800 # Node ID 67bb53a137e1a061087b8fccba09c1a45c54999e # Parent 5744dac88986b8f955c05703084a5cd5ec5acec8# Parent 39b06d766f2adbaf479a135d4992747e9d6037a6 maint: merge stable to default diff -r 5744dac88986 -r 67bb53a137e1 doc/interpreter/external.txi --- a/doc/interpreter/external.txi Sun Nov 27 17:00:20 2022 -0500 +++ b/doc/interpreter/external.txi Sun Nov 27 17:03:48 2022 -0800 @@ -2170,8 +2170,6 @@ @end group @end example -@seealso{javamem} - @node Java Interface Functions @subsection Java Interface Functions diff -r 5744dac88986 -r 67bb53a137e1 libinterp/corefcn/data.cc --- a/libinterp/corefcn/data.cc Sun Nov 27 17:00:20 2022 -0500 +++ b/libinterp/corefcn/data.cc Sun Nov 27 17:03:48 2022 -0800 @@ -2880,8 +2880,8 @@ %! [a, b] = size ([1, 2; 3, 4; 5, 6], [i, j]); %! assert (a, dim(i)); %! assert (b, dim(j)); -%! end -%! end +%! endfor +%! endfor ## Call for three arbitrary dimensions @@ -2900,9 +2900,9 @@ %! assert (a, dim(i)); %! assert (b, dim(j)); %! assert (c, dim(k)); -%! end -%! end -%! end +%! endfor +%! endfor +%! endfor %!error %! [a, b, c] = size ([1, 2; 3, 4; 5, 6], 1:4) diff -r 5744dac88986 -r 67bb53a137e1 libinterp/corefcn/file-io.cc --- a/libinterp/corefcn/file-io.cc Sun Nov 27 17:00:20 2022 -0500 +++ b/libinterp/corefcn/file-io.cc Sun Nov 27 17:03:48 2022 -0800 @@ -1942,7 +1942,7 @@ %! msg1 = "textscan: 1 parameters given, but only 0 values"; %! try %! C = textscan (fid, "", "headerlines"); -%! end_try_catch; +%! end_try_catch %! assert (! feof (fid)); %! fclose (fid); %! unlink (f); @@ -1954,7 +1954,7 @@ %! msg1 = "textscan: HeaderLines must be numeric"; %! try %! C = textscan (fid, "", "headerlines", "hh"); -%! end_try_catch; +%! end_try_catch %! fclose (fid); %! unlink (f); %! assert (msg1, lasterr); @@ -1979,7 +1979,7 @@ %! msg1 = "textscan: EndOfLine must be at most one character or '\\r\\n'"; %! try %! C = textscan (fid, "%f", "EndOfLine", "\n\r"); -%! end_try_catch; +%! end_try_catch %! fclose (fid); %! unlink (f); %! assert (msg1, lasterr); @@ -1992,7 +1992,7 @@ %! msg1 = "textscan: EndOfLine must be at most one character or '\\r\\n'"; %! try %! C = textscan (fid, "%f", "EndOfLine", 33); -%! end_try_catch; +%! end_try_catch %! fclose (fid); %! unlink (f); %! assert (msg1, lasterr); diff -r 5744dac88986 -r 67bb53a137e1 libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Sun Nov 27 17:00:20 2022 -0500 +++ b/libinterp/corefcn/graphics.cc Sun Nov 27 17:03:48 2022 -0800 @@ -2642,7 +2642,7 @@ %! assert (get (h, "marker"), {"x"; "x"}); %! unwind_protect_cleanup %! close (hf); -%! end_unwind_protect; +%! end_unwind_protect %!error %! hf = figure ("visible", "off"); @@ -3619,7 +3619,7 @@ %! assert (get (hf2, "currentobject"), []); %! unwind_protect_cleanup %! close ([hf1, hf2]); -%! end_unwind_protect; +%! end_unwind_protect */ /* @@ -3637,7 +3637,7 @@ %! assert (getappdata (hax, "testdata"), hax) %! unwind_protect_cleanup %! close (hf); -%! end_unwind_protect; +%! end_unwind_protect */ void @@ -11025,7 +11025,7 @@ %! assert (get (hf, "children"), [hctx1; hax]); %! unwind_protect_cleanup %! close (hf); -%! end_unwind_protect; +%! end_unwind_protect */ // --------------------------------------------------------------------- diff -r 5744dac88986 -r 67bb53a137e1 libinterp/corefcn/variables.cc --- a/libinterp/corefcn/variables.cc Sun Nov 27 17:00:20 2022 -0500 +++ b/libinterp/corefcn/variables.cc Sun Nov 27 17:03:48 2022 -0800 @@ -1367,11 +1367,11 @@ ## This test must be wrapped in its own function or the 'clear' command will ## break the %!test environment. %!function __test_clear_no_args__ () -%! global x +%! global x; %! x = 3; %! clear %! assert (! exist ("x", "var")); # x is not in the current workspace anymore -%! global x # but still lives in the global workspace +%! global x; # but still lives in the global workspace %! assert (exist ("x", "var")); %!endfunction diff -r 5744dac88986 -r 67bb53a137e1 test/bug-35448/bug-35448.tst --- a/test/bug-35448/bug-35448.tst Sun Nov 27 17:00:20 2022 -0500 +++ b/test/bug-35448/bug-35448.tst Sun Nov 27 17:03:48 2022 -0800 @@ -24,14 +24,14 @@ ######################################################################## %!test <*35448> -%! global gfun +%! global gfun; %! gfun = @fB; %! y = fA (e); %! assert (y, e); %! clear -global gfun; # cleanup after test %!test <*35448> -%! global gfun +%! global gfun; %! gfun = @fC; %! y = fA (e); %! assert (y, e); diff -r 5744dac88986 -r 67bb53a137e1 test/bug-53027/bug-53027.tst --- a/test/bug-53027/bug-53027.tst Sun Nov 27 17:00:20 2022 -0500 +++ b/test/bug-53027/bug-53027.tst Sun Nov 27 17:03:48 2022 -0800 @@ -1,18 +1,18 @@ %!function load53027 (fname) -%! global X +%! global X; %! X = 2; %! load (fname); %! assert (X, 1); %!endfunction %!function save53027 (fname) -%! global X +%! global X; %! X = 1; %! save (fname, "X"); %!endfunction %!test <*53027> -%! global X +%! global X; %! X = 0; %! fname = tempname (); %! save53027 (fname); diff -r 5744dac88986 -r 67bb53a137e1 test/bug-53579.tst --- a/test/bug-53579.tst Sun Nov 27 17:00:20 2022 -0500 +++ b/test/bug-53579.tst Sun Nov 27 17:03:48 2022 -0800 @@ -1,5 +1,5 @@ %!function [raa, rbb, igaa, igbb] = sub1 (aa, bb) -%! global aa bb +%! global aa bb; %! aa = 1; %! raa = aa; %! rbb = bb; @@ -8,7 +8,7 @@ %!endfunction %!test <*53579> -%! global aa bb +%! global aa bb; %! assert (isglobal ("aa")); %! assert (isglobal ("bb")); %! aa = 3; diff -r 5744dac88986 -r 67bb53a137e1 test/bug-53599.tst --- a/test/bug-53599.tst Sun Nov 27 17:00:20 2022 -0500 +++ b/test/bug-53599.tst Sun Nov 27 17:03:48 2022 -0800 @@ -1,5 +1,5 @@ %!function rval = sggval (val) -%! global gval +%! global gval; %! if (nargin == 1) %! gval = val; %! else @@ -8,7 +8,7 @@ %!endfunction %!test <*53599> -%! global gval +%! global gval; %! assert (isempty (gval)) %! sggval (13); %! assert (sggval (), 13); @@ -18,7 +18,7 @@ %! gval = 42; %! assert (sggval (), []); %! clear gval -%! global gval +%! global gval; %! gval = 42; %! assert (sggval (), 42); %! clear -global gval; # cleanup after test diff -r 5744dac88986 -r 67bb53a137e1 test/bug-53956/bug-53956.tst --- a/test/bug-53956/bug-53956.tst Sun Nov 27 17:00:20 2022 -0500 +++ b/test/bug-53956/bug-53956.tst Sun Nov 27 17:03:48 2022 -0800 @@ -1,5 +1,5 @@ %!test <*53956> -%! global dtor2_called dtor4_called +%! global dtor2_called dtor4_called; %! %! dtor2_called = dtor4_called = 0; %! x = bug53956_class_3 (); diff -r 5744dac88986 -r 67bb53a137e1 test/bug-55758/bug-55758.tst --- a/test/bug-55758/bug-55758.tst Sun Nov 27 17:00:20 2022 -0500 +++ b/test/bug-55758/bug-55758.tst Sun Nov 27 17:03:48 2022 -0800 @@ -1,5 +1,5 @@ %!test <*55758> -%! global class_bug_55758_dtor_called +%! global class_bug_55758_dtor_called; %! class_bug_55758_dtor_called = false; %! %! assert (class_bug_55758 (5).value, 5); diff -r 5744dac88986 -r 67bb53a137e1 test/for.tst --- a/test/for.tst Sun Nov 27 17:00:20 2022 -0500 +++ b/test/for.tst Sun Nov 27 17:03:48 2022 -0800 @@ -132,7 +132,7 @@ %!test <*50893> %! cnt = 0; -%! for k = zeros (0,3); +%! for k = zeros (0,3) %! cnt++; %! endfor %! assert (cnt, 0); @@ -140,7 +140,7 @@ %!test <*50893> %! cnt = 0; -%! for k = zeros (3,0); +%! for k = zeros (3,0) %! cnt++; %! endfor %! assert (cnt, 0); @@ -148,7 +148,7 @@ %!test <*50893> %! cnt = 0; -%! for k = zeros (3,0, "uint32"); +%! for k = zeros (3,0, "uint32") %! cnt++; %! endfor %! assert (cnt, 0); @@ -156,7 +156,7 @@ %!test <*50893> %! cnt = 0; -%! for k = cell (0,3); +%! for k = cell (0,3) %! cnt++; %! endfor %! assert (cnt, 0); diff -r 5744dac88986 -r 67bb53a137e1 test/global.tst --- a/test/global.tst Sun Nov 27 17:00:20 2022 -0500 +++ b/test/global.tst Sun Nov 27 17:03:48 2022 -0800 @@ -104,16 +104,16 @@ %!test %! warning ("off", "Octave:global-local-conflict", "local"); %! clear global x ## clears global and local value -%! global x +%! global x; %! x = 0; %! assert (f (), 0); -%! global x +%! global x; %! assert (x, 0); %!test %! warning ("off", "Octave:global-local-conflict", "local"); %! clear global x ## clears global and local value %! assert (f (), 1); -%! global x +%! global x; %! assert (x, 1); %! clear -global x; # cleanup after test @@ -125,16 +125,16 @@ %!test %! warning ("off", "Octave:global-local-conflict", "local"); %! clear global x ## clears global and local value -%! global x +%! global x; %! x = 0; %! assert (f (), 0); -%! global x +%! global x; %! assert (x, 0); %!test %! warning ("off", "Octave:global-local-conflict", "local"); %! clear global x %! assert (f (), 1); -%! global x +%! global x; %! assert (x, 1); %! clear -global x; # cleanup after test @@ -142,7 +142,7 @@ %! warning ("off", "Octave:global-local-conflict", "local"); %! clear global x ## clears global and local value %! x = 42; ## local value -%! global x ## link to undefined global, global gets local value +%! global x; ## link to undefined global, global gets local value %! assert (x, 42); %! clear x ## clears local; global still defined %! x = 13; ## new local value diff -r 5744dac88986 -r 67bb53a137e1 test/io.tst --- a/test/io.tst Sun Nov 27 17:00:20 2022 -0500 +++ b/test/io.tst Sun Nov 27 17:03:48 2022 -0800 @@ -1209,9 +1209,9 @@ %! f_texts = {"foo\nbar\nbaz\n", "foo\rbar\rbaz\r", "foo\r\nbar\r\nbaz\r\n"}; %! for i = 1:numel (w_modes) %! w_mode = w_modes{i}; -%! for j = 1:numel (r_modes); +%! for j = 1:numel (r_modes) %! r_mode = r_modes{j}; -%! for k = 1:numel (f_texts); +%! for k = 1:numel (f_texts) %! f_text = f_texts{k}; %! fname = tempname (); %! fid = fopen (fname, w_mode); diff -r 5744dac88986 -r 67bb53a137e1 test/struct.tst --- a/test/struct.tst Sun Nov 27 17:00:20 2022 -0500 +++ b/test/struct.tst Sun Nov 27 17:03:48 2022 -0800 @@ -200,7 +200,7 @@ %! assert (a.b.e.b.d.c, struct ("a", 1, "b", 2)); ## test lazy copying in structs: nested assignment via function -%!function aa = do_nest (a); +%!function aa = do_nest (a) %! aa = a; %! aa.b = a; %!endfunction @@ -212,7 +212,7 @@ %! assert (a.b.b.b, struct ("c", 1)); ## test lazy copying in structs: nested assignment via function -%!function aa = do_nest (a); +%!function aa = do_nest (a) %! aa = a; %! aa.b = a; %! aa.b.c = aa;