用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/dada-lang/dada --skill run-tests命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | run-tests |
| description | Run and interpret Dada test results. Use when running tests, debugging test failures, or understanding test output. |
# Run all tests
cargo dada test --porcelain
# Run tests in a directory
cargo dada test --porcelain tests/syntax/string_literals/
# Run a single test file
cargo dada test --porcelain tests/syntax/string_literals/type.dada
Always use --porcelain for machine-readable JSON output with structured failure information.
The --porcelain flag produces JSON with this structure:
{
"summary": { "total": 45, "passed": 45, "failed": 0, "duration_ms": 70 },
"tests": [
{
"path": "tests/syntax/string_literals/type.dada",
"status": "pass",
"annotations": ["#:skip_codegen", "#:spec syntax.string-literals.type"]
}
]
}
For failures, each test includes:
suggestion — Actionable guidance on how to resolve the failure. Read this first.details — Usually points to a .test-report.md file alongside the testWhen a test fails, a .test-report.md file is generated next to the test file. It contains:
#! annotations that didn't match any compiler output#? probes that got unexpected results#:spec syntax.string-literals.escape-sequences.backslash
Links the test to a spec paragraph. Validated against actual spec files.
#:skip_codegen # Skip WebAssembly generation (use for parser/type-check only tests)
#:fn_asts # Compare function AST output against .ref file
#!)Without carets — error can start anywhere on the previous interesting line:
print(unknown_var)
#! could not find anything named `unknown_var`
With carets — error span must match exactly (caret position = column on previous line):
fn test() { bad_name() }
#! ^^^^^^^^ could not find anything named `bad_name`
With regex — use / prefix (opening / only, NO closing /):
is_shared(x.mut)
#! /where clause.*not satisfied
Important: The regex convention uses
/patternwith NO closing/. Including a closing/causes the/to be part of the regex pattern, which will fail to match.
#?)let x = 22 + 44
#? ^^ ExprType: u32 # Type of expression at that span
#? ^ VariableType: u32 # Type of the variable
Caret position must align with the target on the previous line. VariableType shows the declared type (e.g., String not my String — the permission is on the expression, not the variable).
Probes also support regex with /:
#? ^ VariableType: /my.*String
#:skip_codegen#! annotations; the test passes when all expected errors match and no unexpected errors appear#? annotations; the test passes when all probes return expected values