mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-07 03:00:29 +00:00
Add legacy_tool.dot workflow and CLI tests for backwards compat
Exercises the old tool_command attribute through validate and dry-run to catch regressions in the tool → script compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f81113d71c
commit
379f92c110
2 changed files with 28 additions and 0 deletions
|
|
@ -53,6 +53,15 @@ fn validate_styled() {
|
|||
.stderr(predicate::str::contains("Validation: OK"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validate_legacy_tool() {
|
||||
attractor()
|
||||
.args(["validate", "../../test/legacy_tool.dot"])
|
||||
.assert()
|
||||
.success()
|
||||
.stderr(predicate::str::contains("Validation: OK"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validate_invalid() {
|
||||
attractor()
|
||||
|
|
@ -118,6 +127,14 @@ fn dry_run_styled() {
|
|||
.success();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dry_run_legacy_tool() {
|
||||
attractor()
|
||||
.args(["run", "--dry-run", "--auto-approve", "../../test/legacy_tool.dot"])
|
||||
.assert()
|
||||
.success();
|
||||
}
|
||||
|
||||
// -- NDJSON logging ----------------------------------------------------------
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
11
test/legacy_tool.dot
Normal file
11
test/legacy_tool.dot
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
digraph LegacyTool {
|
||||
graph [goal="Verify backwards compatibility with old tool naming"]
|
||||
rankdir=LR
|
||||
|
||||
start [shape=Mdiamond, label="Start"]
|
||||
exit [shape=Msquare, label="Exit"]
|
||||
|
||||
echo_task [label="Echo", shape=parallelogram, tool_command="echo hello"]
|
||||
|
||||
start -> echo_task -> exit
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue