[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52116] Textscan filepointer bug is still pres
From: |
Hartmut |
Subject: |
[Octave-bug-tracker] [bug #52116] Textscan filepointer bug is still present in Windows build |
Date: |
Sun, 22 Oct 2017 15:00:59 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 |
Follow-up Comment #14, bug #52116 (project octave):
I have also hit this bug. (My application case worked fine with previous
versions of Octave, version 4.0.3 for example. So this might be a regression
bug.)
I have compiled a current code version of Octave (hg id 209e4f34d243) with the
first patch from comment #12, i.e. file #41900. And this patch FIXED the issue
for me. Running "make test" also revealed no other failing tests.
I also tried to construct a minimal example to be used as a new test case for
the textscan function. Here it is:
data2 = "asdf\n";
data3 =
"a,bbbb,cccc,ddddddd,eeeeeeeeeeeee,fffff,ggggggggg,hhhhhhhhh,xxxxxxxxx\n";
data4 = "1,2,3,4,5,6,7,8,9\n";
filename = tempname ();
fid = fopen (filename, "w");
fputs (fid, data1);
fputs (fid, data2);
fputs (fid, data3);
fputs (fid, data4);
fclose (fid);
fid = fopen (filename);
header = textscan (fid, "%s", 2, "delimiter", "");
result = textscan (fid, "%s%s", 1, "delimiter", ",");
fclose (fid);
delete (filename);
assert (result{1,2}, {"bbbb"});
This test fails with Octave 4.2.1, but succeeds with dev Octave plus the
mentioned patch. (But it also fails with Octave 4.0.3...)
Would it be possible to include this littel patch (at least file #41900) into
the stable branch and not only into the default branch?
(I have not tested the second patch, file #41901 .)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52116>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/