view test/bug-54490.tst @ 32068:13362cd35b72

Suppress unexpected warning messages when running .tst files in test/ dir (bug #64123) * bug-53579.tst: Temporarily disable 'Octave:global-local-conflict' warning. * leftdiv.tst: Change 4 %!assert tests to %!warning tests looking for 'Octave:singular-matrix' warning. * parser.tst: Temporarily disable 'Octave:colon-nonscalar-argument' warning. * range.tst: Temporarily disable 'Octave:colon-complex-argument' warning. * struct.tst: Temporarily disable 'Octave:empty-index' warning.
author Rik <rik@octave.org>
date Sun, 30 Apr 2023 15:44:32 -0700
parents 9080316864bf
children
line wrap: on
line source

%!function out = bug54490 ()
%!  global k;
%!  k = 1;
%!  out = 3;
%!endfunction

%!test <*54490>
%! global k;
%! k = 2;
%! a = [5, 6];
%! a(k) = bug54490 ();
%! assert (a, [5, 3]);
%! k = 2;
%! a = [5, 6];
%! [a(k)] = bug54490 ();
%! assert (a, [5, 3]);
%! clear -global k;  # cleanup after test