[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 81d0449aed 16/16: Merge pull request #366 fro
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 81d0449aed 16/16: Merge pull request #366 from rswgnu/add-pathname-with-line-number-spec-test |
Date: |
Tue, 1 Aug 2023 03:58:13 -0400 (EDT) |
branch: externals/hyperbole
commit 81d0449aed6a07c03f5425eedb40282ad3ee1cd8
Merge: 6fb1e9624e 6c51fc1290
Author: Robert Weiner <rsw@gnu.org>
Commit: GitHub <noreply@github.com>
Merge pull request #366 from rswgnu/add-pathname-with-line-number-spec-test
Add tests for pathname with line number specification
---
ChangeLog | 6 ++++++
test/hmouse-drv-tests.el | 39 ++++++++++++++++++++++++++++++++++++++-
2 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 5b29dfe082..d50a06b846 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,12 @@
of "hbut" which defines 'defal' and prevents compilation error when
"hibtypes"
tries to load this.
+2023-07-14 Mats Lidell <matsl@gnu.org>
+
+* test/hmouse-drv-tests.el (hbut-pathname-line-test)
+ (hbut-pathname-line-test-duplicate): Add tests for pathname with line
+ number specification.
+
2023-07-13 Mats Lidell <matsl@gnu.org>
* test/hmouse-drv-tests.el (hbut-pathname-anchor-must-match-all)
diff --git a/test/hmouse-drv-tests.el b/test/hmouse-drv-tests.el
index 99062bce2c..8f33a00dcd 100644
--- a/test/hmouse-drv-tests.el
+++ b/test/hmouse-drv-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 28-Feb-21 at 22:52:00
-;; Last-Mod: 13-Jul-23 at 00:45:55 by Mats Lidell
+;; Last-Mod: 14-Jul-23 at 23:40:55 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -271,6 +271,43 @@
(should (string= "hyperbole.el" (buffer-name))))
(kill-buffer "hyperbole.el")))
+(ert-deftest hbut-pathname-line-test ()
+ "Pathname with line number specification."
+ (let ((file (make-temp-file "hypb" nil nil
+ "Line1\nLine2\n")))
+ (unwind-protect
+ (with-temp-buffer
+ (insert (concat "\"" file ":1\""))
+ (goto-char 2)
+ (action-key)
+ (should (string= file (buffer-file-name)))
+ (should (looking-at "Line1")))
+ (hy-delete-file-and-buffer file))))
+
+(ert-deftest hbut-pathname-line-test-duplicate ()
+ "Pathname with line number specification, duplicate ibut to same file.
+
+BUG: See FIXME: The ibut link goes to the wrong line. Is there a
+problem with a mix up when there are multiple ibuts to the same
+file but with different lines specifications?"
+ (let* ((file
+ (make-temp-file "hypb" nil nil
+ "Line1\nLine2\n"))
+ (ibutfile
+ (make-temp-file "hypb" nil nil
+ (concat "\"" file ":1\"" "\n" "\"" file ":2\"\n"))))
+ (unwind-protect
+ (progn
+ (find-file ibutfile)
+ (forward-line)
+ (should (looking-at-p (concat "\"" file ":2\"")))
+ (forward-char 2)
+ (action-key)
+ (should (string= file (buffer-file-name)))
+ (should (looking-at "Line1"))) ; FIXME: Should be looking a Line2
+ (hy-delete-file-and-buffer file)
+ (hy-delete-file-and-buffer ibutfile))))
+
(ert-deftest hbut-pathname-anchor-test ()
"Pathname with anchor."
(let ((file (make-temp-file "hypb" nil nil
- [elpa] externals/hyperbole cba8f7f675 09/16: Merge branch 'master' into install-test-for-elpaca-package-manager, (continued)
- [elpa] externals/hyperbole cba8f7f675 09/16: Merge branch 'master' into install-test-for-elpaca-package-manager, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole 4491f44d3e 13/16: Merge branch 'master' into rsw, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole 840ceb8b27 04/16: Merge branch 'master' into rsw, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole b1dd46c6c6 05/16: Merge pull request #372 from rswgnu/rsw, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole 055076ad80 03/16: Fix outstanding issues with Smart Keys and Koutliner, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole b5e19a4ee6 08/16: Merge pull request #373 from rswgnu/rsw, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole a923edcf01 11/16: Merge branch 'master' into add-pathname-with-line-number-spec-test, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole 1a1f446dda 12/16: ChangeLog: Fix potential unbound use of vertico-mouse-mode, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole 6fb1e9624e 14/16: Merge pull request #374 from rswgnu/rsw, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole 6c51fc1290 15/16: Merge branch 'master' into add-pathname-with-line-number-spec-test, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole 81d0449aed 16/16: Merge pull request #366 from rswgnu/add-pathname-with-line-number-spec-test,
ELPA Syncer <=