[PR #483] [MERGED] TEST-NATIVE-TOOL-PATHS-UTF8: exercise narrow ANSI short-name path on UTF-8 Windows hosts #533

Closed
opened 2026-11-26 20:18:12 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/483
Author: @xroneyaa
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: fix/native-tool-paths-utf8-acp


📝 Commits (1)

  • fbbdb09 tests: exercise narrow ANSI short-name path on UTF-8 Windows hosts

📊 Changes

1 file changed (+8 additions, -2 deletions)

View changed files

📝 tests/test_native_tool_paths.py (+8 -2)

📄 Description

Claimed in the coordination issue as: TEST-NATIVE-TOOL-PATHS-UTF8

What and why

scripts/run_gpu_tests.py:native_folder(path, ansi="mbcs") exposes ansi specifically so tests can force a narrow code page. On Windows systems configured with UTF-8 as the active ANSI code page (GetACP() == 65001), "mbcs" encodes private-use characters cleanly without raising UnicodeEncodeError, so test_a_folder_outside_the_code_page_gets_its_short_name_or_none returned work unchanged and failed its assertion instead of testing 8.3 short-name resolution.

This passes ansi="cp1252" in that test (and verifies native.encode("cp1252")), and adds test_a_utf8_code_page_keeps_non_ascii_paths to confirm UTF-8 code pages keep paths outside narrow legacy code pages intact.

Tested

  • python -I tests/test_native_tool_paths.py (Windows 11, ACP=65001) -> Ran 9 tests: 6 passed (test_a_folder_outside_the_code_page_gets_its_short_name_or_none and test_a_utf8_code_page_keeps_non_ascii_paths both pass), 3 skipped (needs spirv-as and spirv-val)
  • python -I scripts/check_no_game_data.py tests/test_native_tool_paths.py -> exit 0

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed (n/a — no translator rule added).

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/483 **Author:** [@xroneyaa](https://github.com/xroneyaa) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `fix/native-tool-paths-utf8-acp` --- ### 📝 Commits (1) - [`fbbdb09`](https://github.com/ubiquitarianism/leonida/commit/fbbdb0979c0ec88d3b341c8f5b27fd601cd53fa7) tests: exercise narrow ANSI short-name path on UTF-8 Windows hosts ### 📊 Changes **1 file changed** (+8 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_native_tool_paths.py` (+8 -2) </details> ### 📄 Description Claimed in the coordination issue as: TEST-NATIVE-TOOL-PATHS-UTF8 ### What and why `scripts/run_gpu_tests.py:native_folder(path, ansi="mbcs")` exposes `ansi` specifically so tests can force a narrow code page. On Windows systems configured with UTF-8 as the active ANSI code page (`GetACP() == 65001`), `"mbcs"` encodes private-use characters cleanly without raising `UnicodeEncodeError`, so `test_a_folder_outside_the_code_page_gets_its_short_name_or_none` returned `work` unchanged and failed its assertion instead of testing 8.3 short-name resolution. This passes `ansi="cp1252"` in that test (and verifies `native.encode("cp1252")`), and adds `test_a_utf8_code_page_keeps_non_ascii_paths` to confirm UTF-8 code pages keep paths outside narrow legacy code pages intact. ### Tested - `python -I tests/test_native_tool_paths.py` (Windows 11, ACP=65001) -> Ran 9 tests: 6 passed (`test_a_folder_outside_the_code_page_gets_its_short_name_or_none` and `test_a_utf8_code_page_keeps_non_ascii_paths` both pass), 3 skipped (needs `spirv-as` and `spirv-val`) - `python -I scripts/check_no_game_data.py tests/test_native_tool_paths.py` -> exit 0 GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed (n/a — no translator rule added). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:12 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#533
No description provided.