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

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

[elpa] externals/hyperbole 508d06e1b5 1/2: Add test for ebut creation to


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 508d06e1b5 1/2: Add test for ebut creation to Info index using completion (#143)
Date: Sun, 2 Jan 2022 11:57:35 -0500 (EST)

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

    Add test for ebut creation to Info index using completion (#143)
    
    * Add test for ebut creation to Info index using completion
    
    * Use label hypb-intro-button
---
 ChangeLog         |  5 +++++
 test/hui-tests.el | 16 ++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 0116a986c3..1f067aede4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-01-02  Mats Lidell  <matsl@gnu.org>
+
+* test/hui-tests.el (hui-ebut-create-link-to-info-index-using-completion):
+    New test case.
+
 2022-01-01  Bob Weiner  <rsw@gnu.org>
 
 * test/hpath-tests.el (hpath:prepend-ls-directory-test):
diff --git a/test/hui-tests.el b/test/hui-tests.el
index 951f0a37bb..11e9eef69d 100644
--- a/test/hui-tests.el
+++ b/test/hui-tests.el
@@ -136,6 +136,22 @@ Modifying the button but keeping the label creates a 
dubbel label."
           (should (equal (hattr:get (hbut:at-p) 'lbl-key) "label")))
       (delete-file file))))
 
+(ert-deftest hui-ebut-create-link-to-info-index-using-completion ()
+  "Create an ebut with link to Info index using completion for the index item."
+  (skip-unless (not noninteractive))
+  (let ((file (make-temp-file "hypb_" nil ".txt")))
+    (unwind-protect
+        (progn
+          (find-file file)
+          (should (hact 'kbd-key "C-h h e c hypb-intro-button RET RET 
link-to-Info-index-item RET (hyperbole)Introduct TAB RET"))
+          (hy-test-helpers:consume-input-events)
+          (should (eq (hattr:get (hbut:at-p) 'actype) 
'actypes::link-to-Info-index-item))
+          (should (equal (hattr:get (hbut:at-p) 'args) 
'("(hyperbole)Introduction")))
+          (should (equal (hattr:get (hbut:at-p) 'lbl-key) 
"hypb-intro-button")))
+      (progn
+        (kill-buffer "*info*")
+        (delete-file file)))))
+
 ;; This file can't be byte-compiled without `with-simulated-input' which
 ;; is not part of the actual dependencies, so:
 ;;   Local Variables:



reply via email to

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