Subject: Re: bug#24944: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24

From: Sean Whitton <[email-masked]>
Date: Tue, 15 Nov 2016 09:06:06 -0700

On Tue, Nov 15, 2016 at 05:20:36PM +0200, Eli Zaretskii wrote:
> A better test is to use fboundp (after requiring the package that
> should define it) to probe whether the function exists or not, instead
> of relying on the version.

Thanks.  Improved patch attached.

Note that this is against the version of seq in elpa.git, not emacs.git

-- 
Sean Whitton
From 494e3476538cd2cefdc7343057ccfb33412aca73 Mon Sep 17 00:00:00 2001
From: Sean Whitton <[email-masked]>
Date: Mon, 14 Nov 2016 20:58:14 -0700
Subject: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24

The function `map-length' is not available.
---
 packages/seq/tests/seq-tests.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/packages/seq/tests/seq-tests.el b/packages/seq/tests/seq-tests.el
index 53930fa..0e15f25 100644
--- a/packages/seq/tests/seq-tests.el
+++ b/packages/seq/tests/seq-tests.el
@@ -28,6 +28,7 @@
 
 (require 'ert)
 (require 'seq)
+(require 'map)
 
 (defmacro with-test-sequences (spec &rest body)
   "Successively bind VAR to a list, vector, and string built from SEQ.
@@ -351,6 +352,7 @@ Evaluate BODY for each created sequence.
                    ["xxx" "xx" "x"]))))
 
 (ert-deftest test-seq-random-elt-take-all ()
+  (skip-unless (fboundp 'map-length))
   (let ((seq '(a b c d e))
         (count '()))
     (should (= 0 (map-length count)))
-- 
2.10.2