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

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

[nongnu] elpa/popup 5e9043e 032/184: Bug fix for test helper


From: ELPA Syncer
Subject: [nongnu] elpa/popup 5e9043e 032/184: Bug fix for test helper
Date: Wed, 6 Oct 2021 00:01:01 -0400 (EDT)

branch: elpa/popup
commit 5e9043ebea8c1873e08f786bc8754f990fc8a96e
Author: yuuki arisawa <yuuki.ari@gmail.com>
Commit: yuuki arisawa <yuuki.ari@gmail.com>

    Bug fix for test helper
    
    Change to return position instead of slice
---
 tests/popup-test.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/popup-test.el b/tests/popup-test.el
index b3b12ba..480c7d6 100644
--- a/tests/popup-test.el
+++ b/tests/popup-test.el
@@ -51,11 +51,13 @@ into real text. Return *text* buffer"
 
 (defun popup-test-helper-match-points (contents)
   "Return list of start of first match"
-  (if (listp contents)
-      (mapcar (lambda (content)
-                (string-match content
-                              (popup-test-helper-overlays-to-text)))
-              contents)))
+  (when (listp contents)
+    (let ((text (buffer-string)))
+      (mapcar
+       (lambda (content)
+         (let ((pos (string-match content text)))
+           (if (null pos) pos (1+ pos))))
+       contents))))
 
 (defun popup-test-helper-points-to-column (points)
   (mapcar



reply via email to

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