emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 0affd93 21/29: Fix the new test to work in Emacs 24


From: Dmitry Gutov
Subject: [elpa] master 0affd93 21/29: Fix the new test to work in Emacs 24
Date: Tue, 28 Mar 2017 20:50:36 -0400 (EDT)

branch: master
commit 0affd93a3a78ab052404f7fcbd6ea88e661c6082
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Fix the new test to work in Emacs 24
---
 test/core-tests.el | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/test/core-tests.el b/test/core-tests.el
index 6876ed5..6e227da8 100644
--- a/test/core-tests.el
+++ b/test/core-tests.el
@@ -345,12 +345,17 @@
            (list (lambda (command &optional _)
                    (cl-case command
                      (prefix (buffer-substring 5 (point)))
-                     (candidates '("abcd" "abef")))))))
-      (electric-pair-local-mode)
-      (let (this-command)
-        (company-complete))
-      (let ((last-command-event ?\)))
-        (company-call 'self-insert-command 1))
+                     (candidates '("abcd" "abef"))))))
+          (electric-pair electric-pair-mode))
+      (unwind-protect
+          (progn
+            (electric-pair-mode)
+            (let (this-command)
+              (company-complete))
+            (let ((last-command-event ?\)))
+              (company-call 'self-insert-command 1)))
+        (unless electric-pair
+          (electric-pair-mode -1)))
       (should (string= "foo(abcd)" (buffer-string))))))
 
 (ert-deftest company-no-auto-complete-when-idle ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]