all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 72721@debbugs.gnu.org, gautier@gautierponsinet.xyz
Subject: bug#72721: 31.0.50; Visual-wrap-prefix-mode breaks Magit log buffers
Date: Sun, 25 Aug 2024 11:41:40 -0700	[thread overview]
Message-ID: <0d872da4-fa50-480f-425d-9918c1d556fc@gmail.com> (raw)
In-Reply-To: <865xrolcwi.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

On 8/25/2024 10:39 AM, Eli Zaretskii wrote:
>> Date: Sun, 25 Aug 2024 09:26:12 -0700
>> Cc: 72721@debbugs.gnu.org, gautier@gautierponsinet.xyz
>> From: Jim Porter <jporterbugs@gmail.com>
>>
>> Thanks for merging. Everything looks correct to me. I've added a few
>> more test cases to exercise window-specific overlays and they all work
>> the way I'd expect. See attached.
> 
> Thanks.  How about adding these to test/manual/redisplay-testsuite.el?

Do these look ok? It tests everything except window-specific overlays. 
(I could probably add that too, but I'd have to think of a simple way to 
explain to the reader how they should verify the expected results.)

[-- Attachment #2: 0001-Add-manual-tests-for-the-min-width-display-property.patch --]
[-- Type: text/plain, Size: 3276 bytes --]

From e36fe56d1e9783e72d4aa70324984dc210159324 Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Sun, 25 Aug 2024 11:37:44 -0700
Subject: [PATCH] Add manual tests for the 'min-width' display property

* test/manual/redisplay-testsuite.el (test-redisplay-5): Add some
newlines.
(test-redisplay-6): New function...
(test-redisplay): ... call it (bug#72721).
---
 test/manual/redisplay-testsuite.el | 56 +++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/test/manual/redisplay-testsuite.el b/test/manual/redisplay-testsuite.el
index 6d1232999ca..0f13c3da417 100644
--- a/test/manual/redisplay-testsuite.el
+++ b/test/manual/redisplay-testsuite.el
@@ -331,7 +331,60 @@ test-redisplay-5
         (test-insert-overlay " " 'display (char-to-string #x3fffc)))
   (insert "\n\n")
   (insert-button "Toggle between octal and hex display"
-                 'action 'test-redisplay-5-toggle))
+                 'action 'test-redisplay-5-toggle)
+  (insert "\n\n"))
+
+(defun test-redisplay-6 ()
+  (insert "Test 6: min-width display property:\n\n")
+  (insert "  Expected: 123  45\n")
+  (insert "  Results:  "
+          (propertize "123" 'display '((min-width (5))))
+          "45")
+  (insert "\n\n")
+  (insert "  Expected: 12  34  5\n")
+  (insert "  Results:  "
+          (propertize "12" 'display '((min-width (4))))
+          (propertize "34" 'display '((min-width (4))))
+          "5")
+  (insert "\n\n")
+  (insert "  Expected: 1gnu  45\n")
+  (insert "  Results:  "
+          "1"
+          (propertize "23" 'display
+                      (propertize "gnu" 'display '((min-width (5)))))
+          "45")
+  (insert "\n\n")
+  (insert "  Expected: 123  45\n")
+  (insert "  Results:  ")
+  (test-insert-overlay "123" 'display '((min-width (5))))
+  (insert "45")
+  (insert "\n\n")
+  (insert "  Expected: 1_23 45\n")
+  (insert "  Results:  ")
+  (insert (propertize "123" 'display '((min-width (5)))))
+  (let ((overlay (make-overlay (- (point) 1) (- (point) 2))))
+    (overlay-put overlay 'before-string "_"))
+  (insert "45")
+  (insert "\n\n")
+  (insert (propertize "_" 'display '(left-fringe large-circle))
+          "  Expected: 123  45\n")
+  (insert "  Results:  ")
+  (insert (propertize "123" 'display '((min-width (5)))))
+  (let ((overlay (make-overlay (- (point) 2) (- (point) 1))))
+    (overlay-put overlay 'before-string
+                 (propertize "_" 'display '(left-fringe large-circle))))
+  (insert "45")
+  (insert "\n\n")
+  (insert (propertize "_" 'display '(left-fringe large-circle))
+          "  Expected: 123  45\n")
+  (insert "  Results:  ")
+  (insert (propertize "123" 'display '((min-width (5)))))
+  (let ((overlay1 (make-overlay (- (point) 3) (point)))
+        (overlay2 (make-overlay (- (point) 2) (- (point) 1))))
+    (overlay-put overlay1 'display '((min-width (5))))
+    (overlay-put overlay2 'before-string
+                 (propertize "_" 'display '(left-fringe large-circle))))
+  (insert "45"))
 
 (defun test-redisplay ()
   (interactive)
@@ -349,6 +402,7 @@ test-redisplay
     (test-redisplay-3)
     (test-redisplay-4)
     (test-redisplay-5)
+    (test-redisplay-6)
     (goto-char (point-min))))
 
 ;;; redisplay-testsuite.el ends here
-- 
2.25.1


  reply	other threads:[~2024-08-25 18:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 21:39 bug#72721: 31.0.50; Visual-wrap-prefix-mode breaks Magit log buffers Gautier Ponsinet
2024-08-20  0:46 ` Jim Porter
2024-08-20 11:53   ` Eli Zaretskii
2024-08-20 17:33     ` Jim Porter
2024-08-20 19:01       ` Eli Zaretskii
2024-08-21  3:15         ` Jim Porter
2024-08-21  5:18           ` Jim Porter
2024-08-21 19:12             ` Jim Porter
2024-08-22 12:54               ` Eli Zaretskii
2024-08-22  9:59             ` Eli Zaretskii
2024-08-22  9:53           ` Eli Zaretskii
2024-08-22 16:19             ` Jim Porter
2024-08-25  7:29               ` Eli Zaretskii
2024-08-25 16:26                 ` Jim Porter
2024-08-25 17:39                   ` Eli Zaretskii
2024-08-25 18:41                     ` Jim Porter [this message]
2024-08-29 11:47                       ` Eli Zaretskii
2024-08-30  5:01                         ` Jim Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d872da4-fa50-480f-425d-9918c1d556fc@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=72721@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gautier@gautierponsinet.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.