mirror of
https://github.com/ultraworkers/claw-code.git
synced 2026-05-30 11:45:20 +08:00
fix(test): update compact test to reflect flattened previous-context header
This commit is contained in:
parent
06c126ab6b
commit
0423321cb1
@ -688,7 +688,9 @@ mod tests {
|
|||||||
second_session.messages = follow_up_messages;
|
second_session.messages = follow_up_messages;
|
||||||
let second = compact_session(&second_session, config);
|
let second = compact_session(&second_session, config);
|
||||||
|
|
||||||
assert!(second
|
// "Previously compacted context:" header is intentionally flattened
|
||||||
|
// (no re-nesting) to avoid summary inflation on repeated compaction.
|
||||||
|
assert!(!second
|
||||||
.formatted_summary
|
.formatted_summary
|
||||||
.contains("Previously compacted context:"));
|
.contains("Previously compacted context:"));
|
||||||
assert!(second
|
assert!(second
|
||||||
@ -703,7 +705,7 @@ mod tests {
|
|||||||
assert!(matches!(
|
assert!(matches!(
|
||||||
&second.compacted_session.messages[0].blocks[0],
|
&second.compacted_session.messages[0].blocks[0],
|
||||||
ContentBlock::Text { text }
|
ContentBlock::Text { text }
|
||||||
if text.contains("Previously compacted context:")
|
if !text.contains("Previously compacted context:")
|
||||||
&& text.contains("Newly compacted context:")
|
&& text.contains("Newly compacted context:")
|
||||||
));
|
));
|
||||||
assert!(matches!(
|
assert!(matches!(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user