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