[Maxima] Testing stuff
rswarbrick at googlemail.com
Sun Jan 27 17:19:34 CST 2008
(Aargh! I can't cope with reply all. Sorry if anyone gets this twice...)
On Sun, 27 Jan 2008 09:54:46 -0700
"Robert Dodier" <robert.dodier at gmail.com> wrote:
> At present run_testsuite barfs on :lisp in a test script, but that
> should be relatively easy to fix.
Ok, I've just had a good look at the code.
Lines beginning with ":" are recognised in normal use by dbm-read (!!)
in mdebug.lisp, specifically in the cond case lines 312-381.
test-batch reads in "lines" of input using mread (called at line 332 of
mload.lisp and defined at line 732 of nparse.lisp), which gets an
expression's worth from the stream and then returns it in parsed form.
However, mread doesn't process stuff that was assigned via defbreak,
which is how :lisp gets recognised normally.
Now, dbm-read basically tests for weird stuff starting with : or ? and
then passes the buck to mread, so there's not as much duplication of
functionality as it sounds.
So the questions are:
1) What magic symbols (:, ?, ??) do you want to recognise in test-batch?
2) For those that you do wish to recognise, do you want to recognise
everything? E.g. :help doesn't really make much sense from a test file.
I think a nice solution (once we know what to be matching) is to take
some of the "special match" functionality out of dbm-read and make it
into a more general function, which you can tell which of :,?,?? to
recognise and possibly which specific :blah commands to support. Then
we can call that func. from test-batch instead.
I don't want to start coding until someone reckons it's a good idea,
but I think it's not too many hours of work and would enjoy trying to
get it working, so I'd love to hear what you all think.
More information about the Maxima