# HG changeset patch # User Philip Nienhuis # Date 1458299925 -3600 # Node ID 1b48a5d04fb13df9afaf086d8d157e3157cd173e # Parent 57dea7b5ca469a3f5a7bbeea010b913e0fd154a2 textscan.cc: adapt 3 FAILing tests for Matlab compatibility diff -r 57dea7b5ca46 -r 1b48a5d04fb1 libinterp/corefcn/textscan.cc --- a/libinterp/corefcn/textscan.cc Fri Mar 18 09:33:43 2016 +0100 +++ b/libinterp/corefcn/textscan.cc Fri Mar 18 12:18:45 2016 +0100 @@ -2903,7 +2903,7 @@ %! fseek (fid, 0, "bof"); %! fclose (fid); %! unlink (f); -%! assert (c, {[1;4], [2;NaN], [3;NaN]}) +%! assert (c, {[1;4], 2, 3}) %!error textscan ("1 2 3\n4 s 6", "%f %f %f", "ReturnOnError", 0); @@ -3141,7 +3141,7 @@ ## Bug #42343-2, test padding with supplied emptyvalue %!test -%! a = textscan (",1,,4\nInf, ,NaN", "", "delimiter", ",", "emptyvalue", -10); +%! a = textscan (",1,,4\nInf, ,NaN\n", "", "delimiter", ",", "emptyvalue", -10); %! assert (cell2mat (a), [-10, 1, -10, 4; Inf, -10, NaN, -10]); ## Bug #42528 @@ -3157,7 +3157,7 @@ ## MultipleDelimsAsOne %!test -%! str = "11, 12, 13,, 15\n21,, 23, 24, 25\n,, 33, 34, 35"; +%! str = "11, 12, 13,, 15\n21,, 23, 24, 25\n,, 33, 34, 35\n"; %! C = textscan (str, "%f %f %f %f", "delimiter", ",", "multipledelimsasone", 1, "endofline", "\n"); %! assert (C{1}', [11, 21, 33]); %! assert (C{2}', [12, 23, 34]);