using PlotLine.Services.Context; using static PlotLine.Services.Context.ContextIntentText; internal static class ContextIntentTextTests { public static void Run() { static void Check(bool condition, string message) { if (!condition) throw new Exception(message); } static void Reject(Action action) { try { action(); } catch (ArgumentException) { return; } throw new Exception("Expected bounded-input rejection."); } var parsed = Parse("- [ ] Introduce the disagreement\r\n* [x] Keep the promise\n\n1. Reveal a clue\n• Keep the promise\nUnbulleted objective\n- [ ] "); Check(parsed.Count == 5, "Blank lines and empty checklist entries are omitted."); Check(parsed[1].RequestedCompleted && !parsed[0].RequestedCompleted, "Pasted checks remain explicit preview choices."); Check(parsed[1].Text == parsed[3].Text, "Repeated author objectives are preserved."); Check(Parse("- [X] A\r+ B\n2) C\n– D").Select(x => x.Text).SequenceEqual(new[] { "A", "B", "C", "D" }), "Common bullet and newline formats."); Check(Parse("")[0].Text.StartsWith("