[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/popup ab23548 031/184: Change popup-test-helper-overlays-t
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/popup ab23548 031/184: Change popup-test-helper-overlays-to-text spec and function name to return overlays buffer. |
Date: |
Wed, 6 Oct 2021 00:01:01 -0400 (EDT) |
branch: elpa/popup
commit ab235486bc5fcfba046e95da221913c661eb5e27
Author: yuuki arisawa <yuuki.ari@gmail.com>
Commit: yuuki arisawa <yuuki.ari@gmail.com>
Change popup-test-helper-overlays-to-text spec and function name to return
overlays buffer.
---
tests/popup-test.el | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/tests/popup-test.el b/tests/popup-test.el
index 0d6c75a..b3b12ba 100644
--- a/tests/popup-test.el
+++ b/tests/popup-test.el
@@ -16,10 +16,10 @@
,@body
(popup-delete popup)))))
-(defun popup-test-helper-overlays-to-text ()
+(defun popup-test-helper-get-overlays-buffer ()
"Create a new buffer called *text* containing the visible text
of the current buffer, ie. it converts overlays containing text
-into real text."
+into real text. Return *text* buffer"
(interactive)
(let ((tb (get-buffer-create "*text*"))
(s (point-min))
@@ -47,7 +47,7 @@ into real text."
(let ((x (buffer-substring-no-properties s (point-max))))
(with-current-buffer tb
(insert x)
- (buffer-string)))))
+ tb))))
(defun popup-test-helper-match-points (contents)
"Return list of start of first match"
@@ -75,10 +75,12 @@ into real text."
(popup-set-list popup '("foo" "bar" "baz"))
(popup-draw popup)
(should (equal (popup-list popup) '("foo" "bar" "baz")))
- (let ((points (popup-test-helper-match-points '("foo" "bar" "baz"))))
- (should (every #'identity points))
- (should (popup-test-helper-same-all-p
- (popup-test-helper-points-to-column points) 0)))))
+ (with-current-buffer (popup-test-helper-get-overlays-buffer)
+ (let ((points (popup-test-helper-match-points '("foo" "bar" "baz"))))
+ (should (every #'identity points))
+ (should (equal (popup-test-helper-points-to-column points) '(0 0 0)))
+ (should (popup-test-helper-same-all-p
+ (popup-test-helper-points-to-column points) 0))))))
(ert-deftest popup-test-delete ()
(popup-test-with-common-setup
@@ -91,8 +93,9 @@ into real text."
(popup-draw popup)
(popup-hide popup)
(should (equal (popup-list popup) '("foo" "bar" "baz")))
- (should-not (every #'identity
- (popup-test-helper-match-points '("foo" "bar" "baz"))))
+ (with-current-buffer (popup-test-helper-get-overlays-buffer)
+ (should-not (every #'identity
+ (popup-test-helper-match-points '("foo" "bar"
"baz")))))
))
(ert-deftest popup-test-tip ()
@@ -113,10 +116,11 @@ canceled. The arguments is whole filtered list of items.
HELP-DELAY is a delay of displaying helps."
:nowait t)
- (let ((points (popup-test-helper-match-points
- '("CURSOR-COLOR is a cursor color during isearch"
- "KEYMAP is a keymap"))))
- (should (every #'identity points))
- (should (popup-test-helper-same-all-p
- (popup-test-helper-points-to-column points) 0)))
- ))
+ (with-current-buffer (popup-test-helper-get-overlays-buffer)
+ (let ((points (popup-test-helper-match-points
+ '("CURSOR-COLOR is a cursor color during isearch"
+ "KEYMAP is a keymap"))))
+ (should (every #'identity points))
+ (should (popup-test-helper-same-all-p
+ (popup-test-helper-points-to-column points) 0)))
+ )))
- [nongnu] elpa/popup cf899f8 184/184: Merge pull request #125 from phst/license, (continued)
- [nongnu] elpa/popup cf899f8 184/184: Merge pull request #125 from phst/license, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 2808cc8 001/184: Import from auto-complete repository., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 7743199 075/184: Remove meaningless let., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup b5e13a8 044/184: update README.md to tweak typos and grammar, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 098170f 006/184: Added :always option for :scroll-bar argument., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 2cad059 015/184: Initial commit, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 03b23bf 017/184: Merge branch 'master' of github.com:m2ym/popup-el, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup c85ccd3 013/184: Use inhibit-read-only instead of buffer-read-only, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 2609811 022/184: Add Travis CI configuration, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup e76230b 059/184: Add summary-face keyword argument to popup-set-line-item, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup ab23548 031/184: Change popup-test-helper-overlays-to-text spec and function name to return overlays buffer.,
ELPA Syncer <=
- [nongnu] elpa/popup 498cb64 061/184: Define popup-summary-face, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 54ed4bd 048/184: Add test case:popup-next, popup-previous, popup-select, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup fd8a372 039/184: Remove unused code., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 72c6e4d 027/184: Port some test cases from popup-interactive-test.el, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 180516e 079/184: Use cl-lib functions instead of cl, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 28cb27c 074/184: Add next/previous page commands., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 7fda072 042/184: Add check for row position., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 2593e06 071/184: Add test for #18, #19, #20, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 48b0fa4 020/184: Add a simple test using ERT, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup e208b13 035/184: Setup for batch mode, ELPA Syncer, 2021/10/06