octave-maintainers
[Top][All Lists]
Advanced

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

testing error messages with functions needing a file id


From: PhilipNienhuis
Subject: testing error messages with functions needing a file id
Date: Sat, 16 Mar 2013 16:07:15 -0700 (PDT)

In textscan.m I'd like to have a test like:

%!error <missing or illegal value for> textscan (fid, "%s", "headerlines")

but there are a few stumbling blocks:

1. I wouldn't know how to supply a valid file identifier to textscan so that
the test can be made to work (apparently the error message test is
self-contained (left-adjusted against "%!") and cannot comprise multiple
lines).

2. textscan.m can read from strings as well, but then the whole
'headerlines' processing (incl. error messages) is bypassed so there would
be nothing to test.

Is it at all possible to have a test like above?

(FYI at pressent the relevant tests in textscan.m actually invoke textread
instead of textscan. I want to fix them but if the above can't be made to
work I'll have to remove them)

Thanks 

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/testing-error-messages-with-functions-needing-a-file-id-tp4650879.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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