From eb203ff6fa96822768cf623facf7ca3c82b29963 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Mon, 13 Jul 2026 03:31:31 +0200 Subject: [PATCH] test: guard POSIX filesystem checks on Windows Signed-off-by: Martin Vogel --- tests/test_cli.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_cli.c b/tests/test_cli.c index 6914f839a..04412f3aa 100644 --- a/tests/test_cli.c +++ b/tests/test_cli.c @@ -6455,7 +6455,7 @@ TEST(cli_mcp_installers_preserve_foreign_same_name_entries) { TEST(cli_installer_rejects_symlinked_agent_roots) { #ifdef _WIN32 SKIP_PLATFORM("POSIX symlink parent-chain contract"); -#endif +#else char tmpdir[256]; char qoder_target[256]; char junie_target[256]; @@ -6509,6 +6509,7 @@ TEST(cli_installer_rejects_symlinked_agent_roots) { if (!refused) FAIL("installer must not follow symlinked agent roots outside the selected home"); PASS(); +#endif } TEST(cli_claude_hook_scripts_shell_quote_binary_path) { @@ -7371,7 +7372,11 @@ TEST(cli_uninstall_removes_claude_hook_scripts) { char path[640]; struct stat state; snprintf(path, sizeof(path), "%s/hooks/%s", config_dir, names[i]); +#ifdef _WIN32 + removed = removed && stat(path, &state) != 0; +#else removed = removed && lstat(path, &state) != 0; +#endif } restore_test_env("HOME", saved_home);