octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48326] test printd fails in Win-7


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #48326] test printd fails in Win-7
Date: Wed, 29 Jun 2016 19:47:33 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Update of bug #48326 (project octave):

                  Status:                    None => Need Info              

    _______________________________________________________

Follow-up Comment #1:

So either printd or fileread or both are at fault here. The test as it is
written looks correct. My guess would be that printd is writing a valid text
file with Windows line endings, and fileread is not reading it back
correctly.

Can you check whether the file created by printd has Unix or Windows line
endings?

Can you try this simple patch to fileread.m and see if it fixes this?


diff --git a/scripts/io/fileread.m b/scripts/io/fileread.m
--- a/scripts/io/fileread.m
+++ b/scripts/io/fileread.m
@@ -32,7 +32,7 @@ function str = fileread (filename)
     error ("fileread: FILENAME argument must be a string");
   endif
 
-  fid = fopen (filename, "r");
+  fid = fopen (filename, "rt");
   if (fid < 0)
     error ("fileread: cannot open file");
   endif


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48326>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]