Mercurial > hg > octave-lyh
changeset 13944:c9c063c32f99
test: Fix failing test in fileread.m due to EOL issues (Bug #34897)
fileread.m: Open file in binary, not text, mode to stop EOL conversion issues.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 26 Nov 2011 17:29:04 -0800 |
parents | 5820f8ce683e |
children | 0f69d849360e |
files | scripts/io/fileread.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/io/fileread.m +++ b/scripts/io/fileread.m @@ -49,8 +49,8 @@ %!test %! cstr = {"Hello World", "The answer is 42", "Goodbye World"}; %! fname = tmpnam (); -%! fid = fopen (fname, "wt"); -%! fprintf(fid, "%s\n", cstr{:}) +%! fid = fopen (fname, "w"); +%! fprintf (fid, "%s\n", cstr{:}) %! fclose (fid); %! str = fileread (fname); %! assert (str', [cstr{1} "\n" cstr{2} "\n" cstr{3} "\n"]);