Mercurial > octave
diff libinterp/corefcn/file-io.cc @ 21566:02826fb0f261
textscan: Fix bug in exponent parsing
* oct-stream.cc (textscan::read_double): Fix typo in exponent read loop.
* file-io.cc: Add BIST test for exponent parsing.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Wed, 30 Mar 2016 17:28:43 -0700 |
parents | 990c6c31a684 |
children | ecce63c99c3f |
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc Sat Mar 26 19:46:49 2016 +1100 +++ b/libinterp/corefcn/file-io.cc Wed Mar 30 17:28:43 2016 -0700 @@ -2197,6 +2197,9 @@ %! assert (c, {1, "/", 2}); %!assert (textscan (["1 2 3 4"; "5 6 7 8"], "%f"), {[15; 26; 37; 48]}) + +%% Check for delimiter after exponent +%!assert (textscan ("1e-3|42", "%f", "delimiter", "|"), {[1e-3; 42]}) */ // These tests have end-comment sequences, so can't just be in a comment