Skip to content

fix: make test temp paths Windows-compatible - #6

Merged
RANDOMFNP merged 1 commit into
RANDOMFNP:mainfrom
TrueFurina:fix/windows-compatible-tests
Aug 28, 2026
Merged

fix: make test temp paths Windows-compatible#6
RANDOMFNP merged 1 commit into
RANDOMFNP:mainfrom
TrueFurina:fix/windows-compatible-tests

Conversation

@TrueFurina

Copy link
Copy Markdown
Contributor

Summary

Per #5: the tests hard-code POSIX paths (/tmp/...), so the suite cannot run on Windows even though the core library supports it.

Changes

  • tests/test_core.cpp:
    • unique_temp_path() now resolves the temp directory from TEMPTMP env vars, falling back to /tmp on POSIX (where those vars are unset)
    • added #include <cstdlib> for std::getenv
    • temp file names unchanged, so POSIX behaviour is identical

Verification

  • POSIX: TEMP/TMP are normally unset → falls back to /tmp, same as before
  • Windows: uses %TEMP%/%TMP% → tests no longer write to a non-existent /tmp
  • Not compiled locally (no C++ toolchain here); change is minimal and stdlib-only

@RANDOMFNP
RANDOMFNP merged commit 760389e into RANDOMFNP:main Aug 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants