Mercurial > octave-nkf
view test/bug-38576.tst @ 18512:fdd27f68b011 stable
handle fread skip parameter correctly (bug #41648)
* oct-stream.cc (octave_stream::read): Decide whether to skip based on
current number of elements read, not total. Correctly handle case of
reading partial blocks when there is a repeat cound. Skip to EOF if
the full skip is beyond EOF.
* io.tst: New test.
author | Rik <rik@octave.org> and John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 21 Feb 2014 15:28:02 -0500 |
parents | 730bc06134f9 |
children |
line wrap: on
line source
%!function r = f1 () %! ls = svd (1); %! r = eval ("ls -1;"); %!endfunction %!function r = f2 () %! [u,ls,v] = svd (1); %! r = eval ("ls -1;"); %!endfunction %!function r = f3 (ls) %! r = eval ("ls -1;"); %!endfunction %!test %! ## Windows systems can't run "ls -1" %! if (! ispc ()) %! assert (f1 (), 0); %! assert (f2 (), 0); %! assert (ischar (f3 ()), true); %! assert (f3 (1), 0); %! endif