Files
ai-workflow-skill/docs/tests/repo-memory/link/link-rejects-missing-relation.md
T

27 lines
523 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Case: `link-rejects-missing-relation`
## 用例意义
验证 `link` 对空 relation 输入给出稳定错误,而不是写入无意义关系。
## 前置条件
- 空数据库已完成 `init`
- 已存在两条 entry`#1``#2`
## 输入
```bash
repo-memory link --db TMPDIR/repo-memory.db --from-id 1 --to-id 2
```
## 预期输出
- 命令退出码为 `1`
- stderr 包含 `relation is required`
## 断言结论
- `relation` 是必填输入
- 错误发生在写库前,不会产生半有效的 link 记录