From 854af5310dde4fed6a522a59d1d7816190f42142 Mon Sep 17 00:00:00 2001 From: David Engster Date: Thu, 7 Apr 2011 20:47:29 +0200 Subject: [PATCH 1/1] Avoid failing tests for Emacs without lexical binding. * registry.el (registry-usage-test): Only do `registry-lookup-breaks-before-lexbind' testing for Emacs24 with lexical binding. --- lisp/ChangeLog | 6 ++++++ lisp/registry.el | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 447675c83..ff1b3b7fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-04-07 David Engster + + * registry.el (registry-usage-test): Only do + `registry-lookup-breaks-before-lexbind' testing for Emacs24 with + lexical binding. + 2011-04-07 David Engster * Makefile.in (check, test-registry): New rules for test-suite. diff --git a/lisp/registry.el b/lisp/registry.el index 8fb7aab82..3c402cb36 100644 --- a/lisp/registry.el +++ b/lisp/registry.el @@ -357,12 +357,13 @@ Removes only entries without the :precious keys." (should (= 58 (caadr (registry-lookup db '(1 58 99))))) (message "Grouped individual lookup") (should (= 3 (length (registry-lookup db '(1 58 99))))) - (message "Individual lookup (breaks before lexbind)") - (should (= 58 - (caadr (registry-lookup-breaks-before-lexbind db '(1 58 99))))) - (message "Grouped individual lookup (breaks before lexbind)") - (should (= 3 - (length (registry-lookup-breaks-before-lexbind db '(1 58 99))))) + (when (boundp 'lexical-binding) + (message "Individual lookup (breaks before lexbind)") + (should (= 58 + (caadr (registry-lookup-breaks-before-lexbind db '(1 58 99))))) + (message "Grouped individual lookup (breaks before lexbind)") + (should (= 3 + (length (registry-lookup-breaks-before-lexbind db '(1 58 99)))))) (message "Search") (should (= n (length (registry-search db :all t)))) (should (= n (length (registry-search db :member '((sender "me")))))) -- 2.25.1