Skip to content

Commit cbad12e

Browse files
committed
test(cli): no more vibes, assert "reasoning:" and gear.kcl
- stderr: expect explicit "reasoning:" label, not any colon - stdout: match filename "gear.kcl" instead of "Wrote to", less brittle Signed-off-by: Jessie Frazelle <[email protected]>
1 parent fc40dc9 commit cbad12e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/tests.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ async fn test_main(ctx: &mut MainContext) {
9090
],
9191
// Just assert completion appears in stdout table.
9292
want_out: "Completed".to_string(),
93-
// Any reasoning line has a ':' label; assert stderr is non-empty and contains a ':'
94-
want_err: ":".to_string(),
93+
// Look for explicit reasoning output label in stderr.
94+
want_err: "reasoning:".to_string(),
9595
want_code: 0,
9696
..Default::default()
9797
},
@@ -849,8 +849,10 @@ async fn test_main(ctx: &mut MainContext) {
849849
"it".to_string(),
850850
"blue".to_string(),
851851
],
852-
want_out: "Wrote to".to_string(),
853-
want_err: ":".to_string(),
852+
// Do not match on the "Wrote to" phrase; match on filename presence.
853+
want_out: "gear.kcl".to_string(),
854+
// Look for explicit reasoning output label in stderr.
855+
want_err: "reasoning:".to_string(),
854856
want_code: 0,
855857
current_directory: Some(tmp_path.clone()),
856858
..Default::default()
@@ -869,7 +871,8 @@ async fn test_main(ctx: &mut MainContext) {
869871
"it".to_string(),
870872
"blue".to_string(),
871873
],
872-
want_out: "Wrote to".to_string(),
874+
// Do not match on the "Wrote to" phrase; match on filename presence.
875+
want_out: "gear.kcl".to_string(),
873876
want_err: "".to_string(),
874877
want_code: 0,
875878
current_directory: Some(tmp_path.clone()),

0 commit comments

Comments
 (0)