[1282] 将 shortcut-edit.scm 的 JSON 库从 njson 迁移至 (liii json) - #4521
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
任务描述
在
shortcut-edit.scm中取消对(liii njson)的依赖,直接改用(liii json)处理 Scheme 原生 JSON 数据结构(alist 与 vector)。采用 TDD 方式新增shortcut-edit-test.scm单元测试,驱动并验证重构。变更内容
TeXmacs/progs/source/tests/shortcut-edit-test.scm,全面覆盖快捷键条目结构校验、合法/非法 JSON 模式验证、CRUD 操作、排序查询、旧版.scm兼容迁移合并以及文件持久化与异常回退(共 54 个断言)。(import (liii njson))替换为(import (liii json)).njson-free、njson-schema-report、file->njson、njson->file等 C++ 句柄操作与 schema 校验,改用纯 Scheme 原生数据结构与(liii json)谓词校验。string-save、string-load配合json->string、string->json,移除仅供 C++ handle 访问使用的user-shortcuts-file-system。devel/1282.md,记录 What/Why/How 及自动化单元测试与手工 GUI 测试步骤。如何测试
1. 纯逻辑单元测试(自动化,headless)
2. 手动测试(GUI)
详见
devel/1282.md第 3.2 节:工具 -> 键盘 -> 编辑键盘快捷键打开快捷键编辑器;$TEXMACS_HOME_PATH/system/shortcuts.json的标准 JSON 格式;