From 568e9ce368dc210e231e4f517cb0bc537acdc586 Mon Sep 17 00:00:00 2001 From: skulidropek <66840575+skulidropek@users.noreply.github.com> Date: Sun, 31 May 2026 23:57:20 +0000 Subject: [PATCH] test: cover localized accepted plan headings --- ...0531_000000_test_localized_plan_capture.md | 6 ++++++ tests/unit/plan_capture.rs | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 changelog.d/20260531_000000_test_localized_plan_capture.md diff --git a/changelog.d/20260531_000000_test_localized_plan_capture.md b/changelog.d/20260531_000000_test_localized_plan_capture.md new file mode 100644 index 0000000..2e7ffeb --- /dev/null +++ b/changelog.d/20260531_000000_test_localized_plan_capture.md @@ -0,0 +1,6 @@ +--- +bump: patch +--- + +### Fixed +- Added regression coverage for localized accepted-plan headings. diff --git a/tests/unit/plan_capture.rs b/tests/unit/plan_capture.rs index cb693ac..38b0d33 100644 --- a/tests/unit/plan_capture.rs +++ b/tests/unit/plan_capture.rs @@ -71,6 +71,25 @@ Do not include this. assert!(!plans[0].content.contains("Summary")); } +#[test] +fn extracts_localized_accepted_plan_headings() { + let message = r" +## Принятый план +- Сохранить только подтвержденный план. +- Синхронизировать его с PR. + +## Итог +Не включать этот раздел. +"; + + let plans = extract_marked_plans(message); + + assert_eq!(plans.len(), 1); + assert_eq!(plans[0].title.as_deref(), Some("Принятый план")); + assert!(plans[0].content.contains("подтвержденный план")); + assert!(!plans[0].content.contains("Итог")); +} + #[test] fn extracts_accepted_plan_label_until_next_heading() { let message = r"