Skip to content

Commit ff2ade0

Browse files
Fix Korean filename test length: 96 chars / 240 bytes (>80, fits ext4)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1ae08c3 commit ff2ade0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/unit/test_backup_redesign.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ def test_korean_unicode_doc_name(tmp_path):
131131

132132

133133
def test_very_long_doc_name_gets_hash_suffix_and_breadcrumb(tmp_path):
134-
name = "아주_긴_한글_" * 6 + "final_draft.docx" # >80 chars, within ext4 255-byte limit
135-
assert len(name) > 80
134+
name = "아주_긴_한글_이름_" * 8 + "final_draft.docx" # long enough to trigger hash truncation, within ext4 255-byte limit
135+
assert len(name.encode("utf-8")) <= 255 # ext4 safety
136+
assert len(name) > 80 # long enough to trigger the folder-name truncation
136137
doc = _make_doc(tmp_path, name)
137138
srv.insert_paragraphs(str(doc), [{"text": "long name content"}], at_end=True)
138139
d = safesave.slot_dir(doc)

0 commit comments

Comments
 (0)