diff --git a/test/lisp/vc/vc-tests/vc-test-misc.el b/test/lisp/vc/vc-tests/vc-test-misc.el index 33aebbdb895..0bbcefd16fd 100644 --- a/test/lisp/vc/vc-tests/vc-test-misc.el +++ b/test/lisp/vc/vc-tests/vc-test-misc.el @@ -76,7 +76,9 @@ "Test `vc-exec-after' adding a sentinel." (with-temp-buffer (let ((proc (start-process-shell-command "test" (current-buffer) - "sleep 0.2; echo hello")) + (if (eq system-type 'windows-nt) + "sleep 1 & echo hello" + "sleep 0.2; echo hello"))) success) (vc-exec-after (lambda () (setq success t))) (should-not (eq (process-sentinel proc) @@ -88,7 +90,9 @@ "Test `vc-exec-after' executing the code immediately." (with-temp-buffer (let ((proc (start-process-shell-command "test" (current-buffer) - "sleep 0.2; echo hello")) + (if (eq system-type 'windows-nt) + "sleep 1 & echo hello" + "sleep 0.2; echo hello"))) success) (vc-test--exec-after-wait) (vc-exec-after (lambda () (setq success t))) @@ -100,7 +104,9 @@ "Test SUCCESS argument to `vc-exec-after'." (with-temp-buffer (let ((proc (start-process-shell-command "test" (current-buffer) - "sleep 0.2; echo hello")) + (if (eq system-type 'windows-nt) + "sleep 1 & echo hello" + "sleep 0.2; echo hello"))) (passes (start-process "test2" nil "true")) success) (vc-exec-after (lambda () (setq success t)) passes) @@ -109,7 +115,9 @@ (with-temp-buffer (let ((proc (start-process-shell-command "test" (current-buffer) - "sleep 0.2; echo hello")) + (if (eq system-type 'windows-nt) + "sleep 1 & echo hello" + "sleep 0.2; echo hello"))) (fails (start-process "test2" nil "false")) success) (vc-exec-after (lambda () (setq success t)) fails) @@ -120,7 +128,9 @@ "Test `vc-exec-after' handling the process mark." (with-temp-buffer (let ((proc (start-process-shell-command "test" (current-buffer) - "echo hello there; sleep 0.2")) + (if (eq system-type 'windows-nt) + "echo hello there & sleep 1" + "echo hello there; sleep 0.2"))) success) ;; Disable the default output, which further moves point. (set-process-sentinel proc #'ignore) @@ -140,7 +150,9 @@ "Test `vc-exec-after' with `vc-sentinel-movepoint' variable." (with-temp-buffer (let ((proc (start-process-shell-command "test" (current-buffer) - "echo hello there; sleep 0.2")) + (if (eq system-type 'windows-nt) + "echo hello there & sleep 1" + "echo hello there; sleep 0.2"))) success) ;; Disable the default output, which further moves point. (set-process-sentinel proc #'ignore)