mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-27 16:06:44 +00:00
chore: cargo fmt --all on fix-683 branch
This commit is contained in:
@@ -1242,22 +1242,31 @@ mod tests {
|
||||
let session = persist_session_via_store(&store, "160 regression test");
|
||||
|
||||
// when/then — session exists and is listed before deletion
|
||||
assert!(!store.list_sessions().expect("list").is_empty(),
|
||||
"store should have at least one session");
|
||||
assert!(store.session_exists(&session.session_id),
|
||||
"session should exist before deletion");
|
||||
assert!(
|
||||
!store.list_sessions().expect("list").is_empty(),
|
||||
"store should have at least one session"
|
||||
);
|
||||
assert!(
|
||||
store.session_exists(&session.session_id),
|
||||
"session should exist before deletion"
|
||||
);
|
||||
|
||||
// when — delete the session
|
||||
let deleted = store.delete_session(&session.session_id)
|
||||
let deleted = store
|
||||
.delete_session(&session.session_id)
|
||||
.expect("delete should succeed");
|
||||
|
||||
// then — session is gone
|
||||
assert_eq!(deleted.id, session.session_id);
|
||||
assert!(!deleted.path.exists(), "session file should be removed");
|
||||
assert!(!store.session_exists(&session.session_id),
|
||||
"session should not exist after deletion");
|
||||
assert!(store.list_sessions().expect("list").is_empty(),
|
||||
"store should have no sessions after deletion");
|
||||
assert!(
|
||||
!store.session_exists(&session.session_id),
|
||||
"session should not exist after deletion"
|
||||
);
|
||||
assert!(
|
||||
store.list_sessions().expect("list").is_empty(),
|
||||
"store should have no sessions after deletion"
|
||||
);
|
||||
|
||||
fs::remove_dir_all(base).expect("temp dir should clean up");
|
||||
}
|
||||
|
||||
@@ -902,7 +902,10 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
|
||||
_ => None,
|
||||
};
|
||||
if let Some(topic) = topic {
|
||||
return Ok(CliAction::HelpTopic { topic, output_format });
|
||||
return Ok(CliAction::HelpTopic {
|
||||
topic,
|
||||
output_format,
|
||||
});
|
||||
}
|
||||
}
|
||||
return Ok(CliAction::Help { output_format });
|
||||
|
||||
Reference in New Issue
Block a user