fix(tests): make unit tests build on Windows
Summary
This PR fixes several Windows compatibility issues in the unit tests that prevented the project from building with llvm-mingw on Windows ARM64.
The production targets (transcribe and transcribe-cli) already built successfully, but the test suite used a few POSIX-specific APIs that are unavailable on Windows.
Changes
- Replace the POSIX-only
mkstempsusage with a cross-platform implementation. - Replace
setenvwith the appropriate Windows implementation where necessary. - Fix
std::filesystem::pathhandling so Windows wide-character paths are passed correctly.
Verification
Built successfully on:
- Windows 11 ARM64 (Snapdragon X2 Plus)
- llvm-mingw 20260616 (ucrt-aarch64)
- CMake 4.4.0
- Ninja
Both the library and the complete test suite now build successfully.
Thanks for this. I'll take a look when I can and try to pull it in. I don't have a Windows ARM machine to test on other than CI, so I'll try to push this through CI and just make sure it works.
@raykuo998 I believe ccfe885 has fixed this, let me know