GNU bug report logs - #22729
25.0.50; cl-union ignores :test when lists are equal

Previous Next

Package: emacs;

Reported by: Nicolas Richard <youngfrog <at> members.fsf.org>

Date: Thu, 18 Feb 2016 04:16:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 25.0.50

Fixed in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 22729 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Nicolas Richard <youngfrog <at> members.fsf.org>
Cc: 22729 <at> debbugs.gnu.org
Subject: Re: bug#22729: 25.0.50; cl-union ignores :test when lists are equal
Date: Tue, 23 Feb 2016 14:39:02 +1100
Nicolas Richard <youngfrog <at> members.fsf.org> writes:

> * cl-seq.el (cl-union): Do not ignore :test argument when lists are equal.

Thanks; applied.

> * test/automated/cl-seq-tests.el: New file.

The test fails:

   (ert-test-failed
     ((should
       (equal
        (cl-union ... ... :test ...)
        (list str1 str2)))
      :form
      (equal
       ("foo")
       ("foo" "foo"))
      :value nil :explanation
      (proper-lists-of-different-length 1 2
                                        ("foo")
                                        ("foo" "foo")
                                        first-mismatch-at 1)))

And that's because the two "foo" strings are eql here.  Apparently the
Emacs reader is being clever...

I've fixed that by using non-literal strings and applied.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 9 years and 141 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.