test(polish): 补 Case 4 单测——普通历史在翻译轮喂 final_text (@claude review)

This commit is contained in:
吕柏青 committed 2026-06-04 12:59:08 +08:00
1 parent bff4bd727f
commit 4c31448cb9
1 file changed
+17
@@ -2064,6 +2064,23 @@ mod tests {
assert_eq!(turns, vec![("你好".to_string(), "Hello".to_string())]);
}
#[test]
fn translation_turn_uses_normal_history_final_text() {
// 当前是翻译轮,普通历史照常喂 final_text(本就是源语言润色结果,不需要剔除)。
let sessions = vec![history_session(
"dictation",
"继续",
"继续。",
Some("pack.new"),
false,
None,
)];
let turns = eligible_polish_context_turns(sessions, "pack.new", true);
assert_eq!(turns, vec![("继续".to_string(), "继续。".to_string())]);
}
#[test]
fn streamed_output_skips_postprocessing_mutations() {
let rules = vec![correction_rule("Open AI", "OpenAI")];