I've not really looked at maxima much (or not the code at any rate) for
a couple of weeks, due to work/hurting arm/getting new computer/general
procrastination... but:
The attached patch (against this afternoon's HEAD) gives the testsuite
support for :lisp and I think could be extended reasonably easily to
other break commands if so wished.
The basic changes are:
1) lisp-eval and lisp-quiet (which are called by break-call when you
do :lisp or :lisp-quiet) now return something, specifically the list of
values. Before, :lisp (+ 1 2) would print 3 with princ, but left it at
that, so calling code definitely couldn't get at the results.
I don't think this is likely to break anything - lisp-* didn't return
anything useful before, just nil I think, so I presume no-one's testing
in any contrib code for anything like their return values!
2) test-batch now uses dbm-read to get new lines. This doesn't break
anything... EXCEPT: A stream ending in some whitespace including actual
spaces/tabs causes an error break in dbm-read.
rtest_dot.mac and rtest_abs.mac did just that and it seemed highly
non-trivial to get dbm-read to swallow the result without choking, so
I'm afraid for the time being I've just deleted the crazy whitespace at
their ends. (After all, I can't really imagine anyone having strong
feelings about keeping it!)
I can't think of any other uses that this could impact upon, so I
presume it's ok.
3) test-batch then does clever stuff, partially lifted from continue
(macsys.lisp) to detect and then run :lisp break commands. It doesn't
seem trivial to share the code particulary as continue allows general
break commands (we're only allowing :lisp) and does checking for server
mode etc.
4) There's a test!!! (-: In rtest_testsuite.mac, and yes it should
probably be made more complete, but this at least shows that everything
I changed works I hope.
Does this seem suitable?
Rupert
P.S. the patch needs "patch -p1 <testsuite.patch".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsuite.patch
Type: text/x-patch
Size: 4975 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20080304/dd8443b3/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20080304/dd8443b3/attachment.pgp