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

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

[nongnu] elpa/popup ee5b4b0 034/184: Add test case when point is on the


From: ELPA Syncer
Subject: [nongnu] elpa/popup ee5b4b0 034/184: Add test case when point is on the corner
Date: Wed, 6 Oct 2021 00:01:01 -0400 (EDT)

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

    Add test case when point is on the corner
---
 tests/popup-test.el | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/tests/popup-test.el b/tests/popup-test.el
index 399493a..98c6fee 100644
--- a/tests/popup-test.el
+++ b/tests/popup-test.el
@@ -154,3 +154,43 @@ HELP-DELAY is a delay of displaying helps."
           (should (eq (popup-test-helper-same-all-p
                        (popup-test-helper-points-to-column points)) 1)))
         ))))
+
+(ert-deftest popup-test-folding-long-line-right-top ()
+  (popup-test-with-temp-buffer
+    ;; To use window-width because Emacs 23 does not have window-body-width
+    (insert (make-string (- (window-width) 3) ? ))
+    (popup-test-with-create-popup
+      (popup-tip "long long long long line" :nowait t)
+      (with-current-buffer (popup-test-helper-get-overlays-buffer)
+        (let ((points (popup-test-helper-match-points
+                       '("long long long long line"))))
+          (should (every #'identity points))
+          (should (eq (line-number-at-pos (car points)) 2))
+          )))))
+
+(ert-deftest popup-test-folding-long-line-left-bottom ()
+  (popup-test-with-temp-buffer
+    (insert (make-string (- (window-body-height) 1) ?\n))
+    (popup-test-with-create-popup
+      (popup-tip "long long long long line" :nowait t)
+      (with-current-buffer (popup-test-helper-get-overlays-buffer)
+        (let ((points (popup-test-helper-match-points
+                       '("long long long long line"))))
+          (should (every #'identity points))
+          (should (eq (line-number-at-pos (car points))
+                      (- (window-body-height) 1)))
+          )))))
+
+(ert-deftest popup-test-folding-long-line-right-bottom ()
+  (popup-test-with-temp-buffer
+    (insert (make-string (- (window-body-height) 1) ?\n))
+    (insert (make-string (- (window-width) 3) ? ))
+    (popup-test-with-create-popup
+      (popup-tip "long long long long line" :nowait t)
+      (with-current-buffer (popup-test-helper-get-overlays-buffer)
+        (let ((points (popup-test-helper-match-points
+                       '("long long long long line"))))
+          (should (every #'identity points))
+          (should (eq (line-number-at-pos (car points))
+                      (- (window-body-height) 1))))
+        ))))



reply via email to

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