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

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

[elpa] externals/hyperbole 78929bf90b: Add test case for action key on h


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 78929bf90b: Add test case for action key on hyphen in lisp symbol (#164)
Date: Sun, 20 Mar 2022 15:57:31 -0400 (EDT)

branch: externals/hyperbole
commit 78929bf90beffc81affd732511a0aef65c2109af
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>

    Add test case for action key on hyphen in lisp symbol (#164)
    
    * Add test case for action key on hyphen in lisp symbol
    
    * Verify that proper symbol is found
---
 ChangeLog                |  5 +++++
 test/hmouse-drv-tests.el | 21 +++++++++++++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 69527de448..9f22d8f661 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-03-20  Mats Lidell  <matsl@gnu.org>
+
+* test/hmouse-drv-tests.el (hbut-key-press-on-hyphen-in-elisp-symbol): Add
+    test case.
+
 2022-03-13  Mats Lidell  <matsl@gnu.org>
 
 * man/hyperbole.texi: Fix spelling.
diff --git a/test/hmouse-drv-tests.el b/test/hmouse-drv-tests.el
index 9d266a5a9a..e06cf3bb00 100644
--- a/test/hmouse-drv-tests.el
+++ b/test/hmouse-drv-tests.el
@@ -3,9 +3,9 @@
 ;; Author:       Mats Lidell <matsl@gnu.org>
 ;;
 ;; Orig-Date:    28-Feb-21 at 22:52:00
-;; Last-Mod:     12-Feb-22 at 13:33:53 by Bob Weiner
+;; Last-Mod:     20-Mar-22 at 20:04:47 by Mats Lidell
 ;;
-;; Copyright (C) 2021  Free Software Foundation, Inc.
+;; Copyright (C) 2021-2022  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -22,8 +22,6 @@
 (require 'el-mock)
 (require 'hy-test-helpers "test/hy-test-helpers")
 
-(declare-function hy-test-helpers:consume-input-events "hy-test-helpers")
-
 (ert-deftest hbut-defal ()
   (defal defal-path "${hyperb:dir}/\\1")
   (unwind-protect
@@ -510,6 +508,21 @@
         (action-key)
         (should was-called)))))
 
+(ert-deftest hbut-key-press-on-hyphen-in-elisp-symbol ()
+  "Key press on hyphen in elisp symbol uses smart-lisp-find-tag.
+Regression: Looked up path name '-narrow'."
+  (let* ((symbol-name "hmail:msg-narrow")
+         (el-file (make-temp-file "hypb" nil ".el" (concat "(" symbol-name 
")"))))
+    (unwind-protect
+        (with-current-buffer (find-file el-file)
+          (goto-char (point-min))
+          (goto-char (1- (re-search-forward "-")))
+          (should (string= (smart-lisp-at-tag-p) symbol-name))
+          (with-mock
+            (mock (smart-lisp-find-tag nil nil) => t)
+            (action-key)))
+      (delete-file el-file))))
+
 ;; This file can't be byte-compiled without the `el-mock' package (because of
 ;; the use of the `with-mock' macro), which is not a dependency of Hyperbole.
 ;;  Local Variables:



reply via email to

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