bugGNU Octave - Bugs: bug #34897, fileread.m test fail on cygwin

 
 

bug #34897: fileread.m test fail on cygwin

Submitted by:  marco atzeri <matzeri>
Submitted on:  Fri 25 Nov 2011 04:23:25 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 27 Nov 2011 01:31:34 AM UTC, comment #4:

Fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/c9c063c32f99)

Rik <rik5>
Project Administrator
Sun 27 Nov 2011 01:20:22 AM UTC, comment #3:

octave:1> test /pub/hg/octave/scripts/io/fileread.m
PASSES 4 out of 4 tests

marco atzeri <matzeri>
Sun 27 Nov 2011 12:14:11 AM UTC, comment #2:

This is the stupid end-of-line issue which differs between UNIX, Mac, and Windows. Does the test pass if you change the file to be opened in binary mode by omitting the 't' when opening the file?

Rik <rik5>
Project Administrator
Fri 25 Nov 2011 08:07:29 PM UTC, comment #1:

Same on a recently compiled MinGW tip:

Philip@deskprn ~/octave/octave-3.5.x
$ hg tip
changeset: 13933:c3c8f513cf1f
tag: tip
user: Rik <octave@nomad.inbox5.com>
date: Wed Nov 23 10:56:05 2011 -0800
summary: NEWS: Clarify that uiXXX functions are experimental/preliminary.

Philip Nienhuis <philipnienhuis>
Project Member
Fri 25 Nov 2011 04:23:25 PM UTC, original submission:

on cygwin with gcc (GCC) 4.5.3

$ hg tip
changeset: 13930:fe088cef3503
tag: tip
user: Rik <octave@nomad.inbox5.com>
date: Wed Nov 23 08:44:29 2011 -0800
summary: doc: Add missing @group/@end group to orderfields docstring

the strings are incorrectly printed on file
with an additional CR.

>>>>> processing /pub/hg/octave/scripts/io/fileread.m

***** test
cstr = {"Hello World", "The answer is 42", "Goodbye World"};
fname = tmpnam ();
fid = fopen (fname, "wt");
fprintf(fid, "%s\n", cstr{:})
fclose (fid);
str = fileread (fname);
assert (str', [cstr{1} "\n" cstr{2} "\n" cstr{3} "\n"]);
unlink (fname);
!!!!! test failed
assert (str',[cstr{1}, "\n", cstr{2}, "\n", cstr{3}, "\n"]) expected
Hello World
The answer is 42
Goodbye World
but got
Hello World^M
The answer is 42^M
Goodbye World^M

marco atzeri <matzeri>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by philipnienhuis (Posted a comment)
  • -unavailable- added by matzeri (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2011 01:31:34 AM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sun 27 Nov 2011 12:14:11 AM UTCrik5StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1