[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole e75a1d30d4 01/16: Add tests for pathname with
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole e75a1d30d4 01/16: Add tests for pathname with line number specification |
Date: |
Tue, 1 Aug 2023 03:58:10 -0400 (EDT) |
branch: externals/hyperbole
commit e75a1d30d4e71395df4c7cecb4fbbd4b147a9977
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: Mats Lidell <mats.lidell@lidells.se>
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 576ec5365f..545ee5368e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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 updated (84f5c21002 -> 81d0449aed), ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole e75a1d30d4 01/16: Add tests for pathname with line number specification,
ELPA Syncer <=
- [elpa] externals/hyperbole 159a54a31b 02/16: Add elpaca recipe install test, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole 6e25c4e2e9 06/16: Fix potential unbound use of vertico-mouse-mode, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole d304487618 07/16: Merge branch 'rsw' of hyperbole, ELPA Syncer, 2023/08/01
- [elpa] externals/hyperbole 3a45510382 10/16: Merge pull request #371 from rswgnu/install-test-for-elpaca-package-manager, ELPA Syncer, 2023/08/01
- [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