view test/bug-54490.tst @ 31085:4b6f03d7264a stable

test: Move new BISTs to lexer and adapt syntax (bug #62587). * libinterp/parse-tree/lex.ll: Move BISTs from oct-parse.yy to here.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 09 Jun 2022 16:44:10 +0200
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