[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole ce1b5a3a34: Add elisp-compiler-msg-test (#566
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole ce1b5a3a34: Add elisp-compiler-msg-test (#566) |
Date: |
Thu, 8 Aug 2024 06:58:11 -0400 (EDT) |
branch: externals/hyperbole
commit ce1b5a3a343b4c168bbcb66b0ffcb20cc056eb52
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>
Add elisp-compiler-msg-test (#566)
---
ChangeLog | 4 ++++
test/hibtypes-tests.el | 31 ++++++++++++++++++++++++++++++-
2 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 796ff14e15..d1b8e1c30e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-08-08 Mats Lidell <matsl@gnu.org>
+
+* test/hibtypes-tests.el (elisp-compiler-msg-test): Add test.
+
2024-08-06 Mats Lidell <matsl@gnu.org>
* test/hproperty-tests.el: Test file for hproperty.
diff --git a/test/hibtypes-tests.el b/test/hibtypes-tests.el
index ce9a72665d..5d0c334f70 100644
--- a/test/hibtypes-tests.el
+++ b/test/hibtypes-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 20-Feb-21 at 23:45:00
-;; Last-Mod: 28-Jul-24 at 00:33:04 by Mats Lidell
+;; Last-Mod: 5-Aug-24 at 17:37:57 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -305,6 +305,35 @@
;; pathname-line-and-column
;; elisp-compiler-msg
+(ert-deftest elisp-compiler-msg-test ()
+ "Verify elisp-compiler-msg."
+ (let ((orig-buffer-name (symbol-function 'buffer-name)))
+ (cl-letf (((symbol-function 'buffer-name)
+ (lambda (&optional buffer)
+ (if (string-prefix-p " *temp*" (funcall orig-buffer-name))
+ "*Compile-Log*"
+ (funcall orig-buffer-name)))))
+ (with-temp-buffer
+ (insert " passed 1/1 abcde (0.000100 sec)\n")
+ (goto-line 1)
+ (mocklet (((smart-tags-display "abcde" nil) => t))
+ (should (ibtypes::elisp-compiler-msg))))
+
+ (with-temp-buffer
+ (insert "Test abcde backtrace:\n")
+ (goto-line 1)
+ (mocklet (((smart-tags-display "abcde" nil) => t))
+ (should (ibtypes::elisp-compiler-msg))))
+
+ (with-temp-buffer
+ (insert "Compiling /home/user/file.el...
+
+In hyperbole-test:
+file.el:10:20: Warning: Message
+")
+ (goto-line 3)
+ (mocklet (((actypes::link-to-regexp-match "^(def[a-z
\11]+hyperbole-test[ \11\n\15(]" 1 "/home/user/file.el" nil) => t))
+ (should (ibtypes::elisp-compiler-msg)))))))
;; patch-msg
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/hyperbole ce1b5a3a34: Add elisp-compiler-msg-test (#566),
ELPA Syncer <=