[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45748: [PATCH] * test/src/xdisp-tests.el Fix tests to work in batch
From: |
Aaron Jensen |
Subject: |
bug#45748: [PATCH] * test/src/xdisp-tests.el Fix tests to work in batch mode |
Date: |
Sat, 16 Jan 2021 11:12:45 -0600 |
(xdisp-tests--window-text-pixel-size)
(xdisp-tests--window-text-pixel-size-leading-space)
(xdisp-tests--window-text-pixel-size-trailing-space): Fix tests
---
test/src/xdisp-tests.el | 39 +++++++++++++++++++++------------------
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/test/src/xdisp-tests.el b/test/src/xdisp-tests.el
index ec96d777ff..09c2fa83b3 100644
--- a/test/src/xdisp-tests.el
+++ b/test/src/xdisp-tests.el
@@ -73,33 +73,36 @@ xdisp-tests--minibuffer-scroll
(should (equal (nth 1 posns) (nth 2 posns)))))
(ert-deftest xdisp-tests--window-text-pixel-size () ;; bug#45748
- (with-temp-buffer
+ (with-current-buffer-window "*test*" 'display-buffer-reuse-window nil
+ (erase-buffer)
(insert "xxx")
- (let* ((window
- (display-buffer (current-buffer) '(display-buffer-in-child-frame .
nil)))
- (char-width (frame-char-width))
- (size (window-text-pixel-size nil t t)))
- (delete-frame (window-frame window))
+ (let* ((char-width (frame-char-width))
+ (size (window-text-pixel-size (get-buffer-window) t t)))
+ (message "Size: %S" size)
+ (should (equal (/ (car size) char-width) 3)))))
+
+(ert-deftest xdisp-tests--window-text-pixel-size () ;; bug#45748
+ (with-current-buffer (generate-new-buffer "*test*")
+ (insert "xxx")
+ (switch-to-buffer (current-buffer))
+ (let* ((char-width (frame-char-width))
+ (size (window-text-pixel-size nil t t)))
(should (equal (/ (car size) char-width) 3)))))
(ert-deftest xdisp-tests--window-text-pixel-size-leading-space () ;; bug#45748
- (with-temp-buffer
+ (with-current-buffer (generate-new-buffer "*test*")
(insert " xx")
- (let* ((window
- (display-buffer (current-buffer) '(display-buffer-in-child-frame .
nil)))
- (char-width (frame-char-width))
- (size (window-text-pixel-size nil t t)))
- (delete-frame (window-frame window))
+ (switch-to-buffer (current-buffer))
+ (let* ((char-width (frame-char-width))
+ (size (window-text-pixel-size nil t t)))
(should (equal (/ (car size) char-width) 3)))))
(ert-deftest xdisp-tests--window-text-pixel-size-trailing-space () ;; bug#45748
- (with-temp-buffer
+ (with-current-buffer (generate-new-buffer "*test*")
(insert "xx ")
- (let* ((window
- (display-buffer (current-buffer) '(display-buffer-in-child-frame .
nil)))
- (char-width (frame-char-width))
- (size (window-text-pixel-size nil t t)))
- (delete-frame (window-frame window))
+ (switch-to-buffer (current-buffer))
+ (let* ((char-width (frame-char-width))
+ (size (window-text-pixel-size nil t t)))
(should (equal (/ (car size) char-width) 3)))))
;;; xdisp-tests.el ends here
--
2.28.0
- bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, (continued)
- bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, Eli Zaretskii, 2021/01/15
- bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, Aaron Jensen, 2021/01/15
- bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, Eli Zaretskii, 2021/01/15
- bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, Aaron Jensen, 2021/01/15
- bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, Eli Zaretskii, 2021/01/15
- bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, Aaron Jensen, 2021/01/15
- bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, Eli Zaretskii, 2021/01/09
- bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, Eli Zaretskii, 2021/01/09
- bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, Aaron Jensen, 2021/01/09
bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces, martin rudalics, 2021/01/09
bug#45748: [PATCH] * test/src/xdisp-tests.el Fix tests to work in batch mode,
Aaron Jensen <=
bug#45748: [PATCH] * test/src/xdisp-tests.el Fix tests to work in batch mode, Aaron Jensen, 2021/01/16
bug#45748: [PATCH] * test/src/xdisp-tests.el Fix tests to work in batch mode, Aaron Jensen, 2021/01/16