fix(release): harden packaging and filename localization

This commit is contained in:
NimBold
2026-07-30 05:08:26 +03:30
parent 1634118f11
commit 924e108f3c
6 changed files with 41 additions and 5 deletions
+7
View File
@@ -66,6 +66,13 @@ describe('download connection resolution', () => {
});
describe('download filename matching', () => {
it('matches frontend filenames to the backend Windows device-name canonicalization', () => {
expect(canonicalizeDownloadFileName('CON.txt')).toBe('CON-.txt');
expect(canonicalizeDownloadFileName('com1.archive.zip')).toBe('com1.archive-.zip');
expect(downloadFileNamesMatch('CON-.txt', 'CON.txt')).toBe(true);
expect(downloadFileNamesMatch('console.txt', 'CON.txt')).toBe(false);
});
it('truncates long names by UTF-8 bytes while preserving the extension', () => {
const filename = canonicalizeDownloadFileName(`${'title '.repeat(100)}.mp4`);