Skip to content

Commit 364dd6a

Browse files
committed
test(mcp): compare the DeusData#2134 root with forward slashes on Windows
tool_index_repository_reuses_existing_project_for_root_issue2134 counts how often the canonical repo root occurs in list_projects. On Windows, cbm_canonical_path returns "C:\Users\...", while the stored root_path is "C:/Users/...", so the count was 0 and the test failed on the CLANG64 leg (test_mcp.c:8448: owners == 0, expected 1). Normalize the expected root with cbm_normalize_path_sep, a no-op on POSIX, before counting. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 1f0daaa commit 364dd6a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎tests/test_mcp.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8626,6 +8626,8 @@ TEST(tool_index_repository_reuses_existing_project_for_root_issue2134) {
86268626
if (!cbm_canonical_path(repo, canonical_repo, sizeof(canonical_repo))) {
86278627
FAIL("cbm_canonical_path failed");
86288628
}
8629+
/* Stored root_path values use forward slashes on every platform. */
8630+
cbm_normalize_path_sep(canonical_repo);
86298631
const char *saved_cache = getenv("CBM_CACHE_DIR");
86308632
char *saved_cache_copy = saved_cache ? cbm_strdup(saved_cache) : NULL;
86318633
const char *saved_sup = getenv("CBM_INDEX_SUPERVISOR");

0 commit comments

Comments
 (0)