Mercurial > hg > xemacs-beta
diff tests/automated/lisp-tests.el @ 5283:be436ac36ba4
Don't share a counter when checking for circularity, list_merge().
src/ChangeLog addition:
2010-10-12 Aidan Kehoe <kehoea@parhasard.net>
* fns.c (list_merge):
Circularity checking here needs to be done independently for each
list, they can't share a loop counter. Thank you for the bug
report, Robert Pluim!
tests/ChangeLog addition:
2010-10-12 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el:
Make sure circularity checking with #'merge is sane.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 12 Oct 2010 18:14:12 +0100 |
parents | 04811a268716 |
children | 99de5fd48e87 |
line wrap: on
line diff
--- a/tests/automated/lisp-tests.el Sun Oct 10 12:32:38 2010 +0100 +++ b/tests/automated/lisp-tests.el Tue Oct 12 18:14:12 2010 +0100 @@ -2409,4 +2409,10 @@ (Assert (not (eql '1/5 (read (prin1-to-string (intern "2/10"))))) "checking symbol named \"2/10\" not eql to ratio 1/5 on read")) +(let* ((count 0) + (list (map-into (make-list 2048 nil) #'(lambda () (decf count)))) + (expected (append list '(1)))) + (Assert (equal expected (merge 'list list '(1) #'<)) + "checking merge's circularity checks are sane")) + ;;; end of lisp-tests.el