Skip to content

Commit 7e28558

Browse files
author
Cosm1cAC
committed
fix(windows): create CJK test root with UTF-8 mkdir
Signed-off-by: Cosm1cAC <cosm1cac@github.com>
1 parent 8695f3c commit 7e28558

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_mcp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,10 @@ TEST(search_code_scoped_path_with_cjk_root_issue903) {
17741774
char proj_dir[640];
17751775
snprintf(proj_dir, sizeof(proj_dir), "%s/%s", tmp,
17761776
"\xE4\xB8\xAD\xE6\x96\x87\xE9\xA1\xB9\xE7\x9B\xAE");
1777-
cbm_mkdir(proj_dir);
1777+
if (!cbm_mkdir_p(proj_dir, 0755)) {
1778+
cbm_rmdir(tmp);
1779+
FAIL("cannot create CJK project dir");
1780+
}
17781781

17791782
char src_path[768];
17801783
snprintf(src_path, sizeof(src_path), "%s/main.go", proj_dir);

0 commit comments

Comments
 (0)