Repository navigation
Commit c21c42b
committed
test(cli): create the non-ASCII Windows profile through the wide API
The Windows regression test for DeusData#2145 created its profile directory
with test_mkdirp and read the result as a boolean. test_mkdirp returns
0 on success, so the test failed as soon as the directory existed and
never reached the detection it was written to check.
Inverting the check is not enough on its own. test_mkdirp uses
cbm_mkdir, which is the narrow _mkdir on Windows. Under an ANSI code
page such as 1252 it does not create the intended name: it creates a
directory whose name is the UTF-8 bytes read as code-page characters.
The old narrow stat finds that mangled directory and the new wide
lookup correctly does not, so the test would pass without the fix and
fail with it. th_mkdir_p goes through the wide API and creates the
real name, the way a non-ASCII Windows profile actually looks.
Since 2b329fe, Claude Code is detected from settings.json,
.claude.json or the claude CLI, through cbm_file_exists, which is
already wide on Windows; a bare .claude directory no longer marks it
as detected. The test now asserts Cursor, which is detected by its
directory alone, so the assertion goes through dir_exists, the
function this branch changes.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent a36c692 commit c21c42b
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14597 | 14597 | | |
14598 | 14598 | | |
14599 | 14599 | | |
| 14600 | + | |
| 14601 | + | |
| 14602 | + | |
| 14603 | + | |
| 14604 | + | |
14600 | 14605 | | |
14601 | 14606 | | |
14602 | 14607 | | |
14603 | 14608 | | |
14604 | | - | |
14605 | | - | |
14606 | | - | |
| 14609 | + | |
| 14610 | + | |
| 14611 | + | |
14607 | 14612 | | |
14608 | 14613 | | |
14609 | 14614 | | |
14610 | 14615 | | |
14611 | | - | |
14612 | | - | |
| 14616 | + | |
| 14617 | + | |
14613 | 14618 | | |
14614 | 14619 | | |
14615 | 14620 | | |
| |||
0 commit comments