Normalizza percorsi e volumi USN

This commit is contained in:
2026-07-02 10:25:55 +02:00
parent deaabb46c0
commit 169ede14dc
6 changed files with 90 additions and 3 deletions

View File

@@ -21,3 +21,17 @@ def test_expand_path_uses_target_user_for_temp() -> None:
assert expand_path("%TEMP%", "pettirosso") == Path(
"C:/Users/pettirosso/AppData/Local/Temp"
)
def test_expand_path_normalizes_drive_root() -> None:
assert expand_path("d:") == Path("D:/")
def test_expand_path_maps_downloads_token_for_target_user() -> None:
assert expand_path("%DOWNLOADS%", "utente") == Path("C:/Users/utente/Downloads")
def test_expand_path_maps_italian_known_folder_aliases() -> None:
assert expand_path("%USERPROFILE%\\Immagini", "utente") == Path("C:/Users/utente/Pictures")
assert expand_path("%USERPROFILE%\\Musica", "utente") == Path("C:/Users/utente/Music")
assert expand_path("%USERPROFILE%\\video", "utente") == Path("C:/Users/utente/Videos")