file.openBytes: test titles that aren't ASCII

Names with characters outside ASCII, one shorter than the extension,
lose a trailing .designcraft or keep their names like the others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ApvpyStzzHbKyDBNxpzn2Y
This commit is contained in:
Tom MainandClaude Opus 5.5 committed 2026-11-01 13:47:00 -05:00
1 parent 81d5641252
commit 700c4bb344
1 file changed
+6
+6
View File
@@ -435,6 +435,12 @@ mod open_bytes_tests {
("Brochure.v2", "Brochure.v2"),
("Brochure.designcraft.designcraft", "Brochure.designcraft"),
(".designcraft", ".designcraft"),
// Names that aren't ASCII: cutting the extension's length off the end of the last one
// would land inside its `é`.
("Präsentation.designcraft", "Präsentation"),
("日本.DESIGNCRAFT", "日本"),
("é", "é"),
("édesigncraft", "édesigncraft"),
] {
let r = s.execute("file.openBytes", &json!({"name": name, "base64": native["base64"]})).unwrap();
let st = &s.documents()[r["index"].as_u64().unwrap() as usize];