Skip to content

Commit da2ce2d

Browse files
jpnurmiclaude
andcommitted
fix(test): use _wfopen for UTF-8 path in attachment_ref_move test
The test creates a file using an absolute path from opts->run->run_path. When UTF8_TEST_CWD=1, this path contains Thai characters that cannot be represented in the Windows ANSI codepage, causing fopen() to fail. Use _wfopen() with the wide-string path on Windows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 924b1d0 commit da2ce2d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/unit/test_envelopes.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,11 @@ SENTRY_TEST(attachment_ref_move)
10521052
= sentry__path_join_str(run_path, "test_minidump.dmp");
10531053

10541054
size_t large_size = 100 * 1024 * 1024;
1055+
#ifdef SENTRY_PLATFORM_WINDOWS
1056+
FILE *f = _wfopen(src_path->path_w, L"wb");
1057+
#else
10551058
FILE *f = fopen(src_path->path, "wb");
1059+
#endif
10561060
TEST_CHECK(!!f);
10571061
fseek(f, (long)(large_size - 1), SEEK_SET);
10581062
fputc(0, f);

0 commit comments

Comments
 (0)