Mercurial > octave
diff libinterp/corefcn/file-io.cc @ 26640:c18e59476795 stable
file id must not be single for textscan and other file I/O funcs (bug #55577)
* oct-stream.cc (stream_list::get_info): Error if file id is single precision.
(stream_list::get_file_number): Likewise.
* file-io.cc: Ensure textscan input validation error is tested.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Sun, 27 Jan 2019 10:53:25 -0800 |
parents | 3f3677540634 |
children | c942659a57e6 |
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc Sun Jan 27 19:01:50 2019 +0100 +++ b/libinterp/corefcn/file-io.cc Sun Jan 27 10:53:25 2019 -0800 @@ -2278,8 +2278,8 @@ /* ## Test input validation %!error textscan () -%!error textscan (single (40)) -%!error textscan ({40}) +%!error <file id must be> textscan (single (4)) +%!error <file id must be> textscan ({4}) %!error <must be a string> textscan ("Hello World", 2) %!error <at most one character or> %! textscan ("Hello World", "%s", "EndOfLine", 3);