]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix a failure when running server-tests via the command line
authorJim Porter <jporterbugs@gmail.com>
Sat, 10 Dec 2022 06:56:24 +0000 (22:56 -0800)
committerJim Porter <jporterbugs@gmail.com>
Sat, 10 Dec 2022 06:56:24 +0000 (22:56 -0800)
* test/lisp/server-tests.el
(server-tests/server-force-stop/keeps-frames): Delete every new frame
created during the test.  On some systems, 'delete-terminal' will
delete the frames for us, so this ensures that if there are no new
frames, nothing happens.

test/lisp/server-tests.el

index ebf84481c612c75b77477ac2d12a4a95e7738abb..5ef66052c805e8e31f138b2ab3c065b53e1de56d 100644 (file)
@@ -218,8 +218,8 @@ long as this works, the problem in bug#58877 shouldn't occur."
                  (eq (terminal-live-p terminal) t)
                  (not (eq system-type 'windows-nt)))
         (delete-terminal terminal)))
-    ;; Delete the created frame.
-    (delete-frame (car (cl-set-difference (frame-list) starting-frames))
-                  t)))
+    ;; If there are any new frames remaining, delete them.
+    (mapc (lambda (frame) (delete-frame frame t))
+          (cl-set-difference (frame-list) starting-frames))))
 
 ;;; server-tests.el ends here