diff --git a/test/lisp/tab-bar-tests.el b/test/lisp/tab-bar-tests.el index 06a52ed42b1..257f6bd37d3 100644 --- a/test/lisp/tab-bar-tests.el +++ b/test/lisp/tab-bar-tests.el @@ -52,13 +52,16 @@ (tab-bar-tabs-set nil)) (ert-deftest tab-bar-tests-quit-restore-window () - ;; Emba runs the container without "--tty" - ;; (the environment variable "TERM" is nil), and this - ;; test fails with '(error "Could not open file: /dev/tty")'. - ;; Therefore skip it unless it can use '(tty-type . "linux")'. - (skip-unless (or (and (eq system-type 'gnu/linux) (getenv "TERM")) - (and (not noninteractive) - (eq system-type 'windows-nt)))) + (skip-when (pcase system-type + ;; Skip test on MS-Windows in batch mode, since terminal + ;; frames cannot be created in that case. + ('windows-nt noninteractive) + ;; Emba runs the container without "--tty" + ;; (the environment variable "TERM" is nil), and this + ;; test fails with '(error "Could not open file: /dev/tty")'. + ;; Therefore skip it unless it can use '(tty-type . "linux")'. + ('gnu/linux (null (getenv "TERM"))))) + (let* ((frame-params (when noninteractive '((window-system . nil) (tty-type . "linux"))))