mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-28 00:16:45 +00:00
fix+test(#749): compact interactive-only hint now non-null; extend compact JSON test for hint contract
This commit is contained in:
@@ -283,6 +283,16 @@ fn compact_subcommand_json_help_fails_fast_when_stdin_closed() {
|
||||
.contains("claw compact"),
|
||||
"message should name compact: {parsed}"
|
||||
);
|
||||
// #749: hint must be non-empty (was null before fix — same class as #738/#745/#746)
|
||||
let hint = parsed["hint"].as_str().unwrap_or("");
|
||||
assert!(
|
||||
!hint.is_empty(),
|
||||
"compact interactive-only JSON must have non-empty hint (#749); got: {parsed}"
|
||||
);
|
||||
assert!(
|
||||
hint.contains("/compact") || hint.contains("--resume"),
|
||||
"hint should mention /compact or --resume: {hint}"
|
||||
);
|
||||
|
||||
fs::remove_dir_all(&workspace).expect("workspace cleanup should succeed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user