From 2797c4a6d579ebb1bac8a6b3c58ab9db90bed116 Mon Sep 17 00:00:00 2001 From: mrhard9090 <74858909+mrhard9090@users.noreply.github.com> Date: Thu, 24 Sep 2026 09:37:28 +0300 Subject: [PATCH] test: run test_exec_with_separator on Windows when echo is available Co-Authored-By: Claude Opus 5.5 --- tests/tests.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/tests.rs b/tests/tests.rs index d26c01a..c40358a 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -2110,9 +2110,13 @@ fn test_exec_batch_with_limit() { } /// Shell script execution (--exec) with a custom --path-separator -#[cfg(not(windows))] // Windows has no `echo` executable, only the shell builtin #[test] fn test_exec_with_separator() { + // On Windows, `echo` is only a shell builtin unless an `echo` executable is installed. + if cfg!(windows) && std::process::Command::new("echo").output().is_err() { + return; + } + let (te, abs_path) = get_test_env_with_abs_path(DEFAULT_DIRS, DEFAULT_FILES); te.assert_output( &[