view test/bug-54490.tst @ 30309:bf619727bf6c

interpreter: Use UTF-8 locale on Windows if possible. * libinterp/corefcn/interpreter.cc (interpreter::interpreter): Force a UTF-8 locale on Windows if possible. * oct-conf-post.in.h (OCTAVE_HAVE_WINDOWS_UTF8_LOCALE): Assume that Windows will support UTF-8 locales when using UCRT. See also: https://octave.discourse.group/t/1821
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 21 Nov 2021 15:25:04 +0100
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