mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-17 23:57:53 +00:00
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:
1 parent
81d5641252
commit
700c4bb344
1 file changed
+6
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user