]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window): Fix.
authorJuri Linkov <juri@linkov.net>
Wed, 16 Apr 2025 06:23:35 +0000 (09:23 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 16 Apr 2025 07:39:17 +0000 (09:39 +0200)
Select the created frame because 'quit-window' unexpectedly
selects the original frame (https://debbugs.gnu.org/71386#262).
Add a comment about the `message' call bound to the original frame.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00546.html

(cherry picked from commit 864bc762a2006a549ce5274f872c3233ef09003a)

test/lisp/tab-bar-tests.el

index 450713ce22877078719441dd18f241f8d7b2ef2a..81555dad171925321e792a632a968e7f32fac397 100644 (file)
       (should (eq (length (window-list)) 2))
       (should (equal (buffer-name) "*info*"))
       (quit-window)
+      ;; 'quit-window' unexpectedly selects the original frame,
+      ;; so move back to the created frame
+      (select-frame (car (frame-list)))
       (should (eq (length (window-list)) 1))
       (should (eq (length (frame-list)) 2))
-      ;; FIXME: uncomment (should (equal (buffer-name) "*Messages*"))
+      (should (equal (buffer-name) "*Messages*"))
       (quit-window)
       (should (eq (length (frame-list)) 2))
-      ;; Clean up the frame afterwards
+      ;; Delete the created frame afterwards because with tty frames
+      ;; the output of 'message' is bound to the original frame
       (delete-frame))
 
     ;; 2.1. 'quit-restore-window' should close the tab