branch: elpa/popup commit 5e9043ebea8c1873e08f786bc8754f990fc8a96e Author: yuuki arisawa <yuuki....@gmail.com> Commit: yuuki arisawa <yuuki....@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