From: okazaki Date: Sun, 27 Feb 2005 04:10:05 +0000 (+0000) Subject: * elmo-util.el (elmo-list-diff): Reverse order of result lists. X-Git-Tag: wl-2_14-root~16 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d147830d9e4fc451aa46286040a1d299f91ed693;p=elisp%2Fwanderlust.git * elmo-util.el (elmo-list-diff): Reverse order of result lists. * test-elmo-util.el (test-elmo-list-diff): Update. --- diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 1c0d809..0fc2612 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -763,7 +763,7 @@ the directory becomes empty after deletion." ((= (car clist1) (car clist2)) (setq clist1 (cdr clist1) clist2 (cdr clist2))))) - (list list1-only list2-only))) + (list (nreverse list1-only) (nreverse list2-only)))) (defun elmo-list-diff-nonsortable (list1 list2) (let ((clist1 (copy-sequence list1)) diff --git a/tests/test-elmo-util.el b/tests/test-elmo-util.el index ea96809..fabb65d 100644 --- a/tests/test-elmo-util.el +++ b/tests/test-elmo-util.el @@ -104,10 +104,10 @@ (equal '(nil nil) (elmo-list-diff nil nil))) (lunit-assert - (equal '(nil (3 2 1)) + (equal '(nil (1 2 3)) (elmo-list-diff nil list1))) (lunit-assert - (equal '((3 2 1) nil) + (equal '((1 2 3) nil) (elmo-list-diff list1 nil))) (lunit-assert (equal '(nil nil) @@ -119,13 +119,13 @@ (equal '((3) (4)) (elmo-list-diff list1 list3))) (lunit-assert - (equal '((3 2 1) (6 5 4)) + (equal '((1 2 3) (4 5 6)) (elmo-list-diff list1 list4))) (lunit-assert - (equal '((2 1) (6 5)) + (equal '((1 2) (5 6)) (elmo-list-diff list3 list4))) (lunit-assert - (equal '((2 1) (6 5 3)) + (equal '((1 2) (3 5 6)) (elmo-list-diff list3 list5))))) (luna-define-method test-elmo-delete-char-1 ((case test-elmo-util))