From 5764b5f676b5873d5f36f218e744f446d0dcf7f9 Mon Sep 17 00:00:00 2001 From: Jake Coble Date: Sat, 7 Jun 2025 18:26:53 -0400 Subject: Don't swallow last character when splitting lines. * varuga.el (varuga-insert-calendar-line): Don't swallow last character when splitting lines. * varuga-tests.el (line-limit-does-not-eat-characters): New test. Signed-off-by: Arun Isaac --- varuga-tests.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'varuga-tests.el') diff --git a/varuga-tests.el b/varuga-tests.el index 97fb817..ca2d121 100644 --- a/varuga-tests.el +++ b/varuga-tests.el @@ -2,6 +2,7 @@ ;; Send ical calendar invites by email ;; Copyright © 2024 by Arun I +;; Copyright © 2025 Jake Coble ;; ;; Author: Arun Isaac ;; Homepage: https://git.systemreboot.net/varuga @@ -71,3 +72,9 @@ (count-lines (point-min) (point-max))) 2))) +(ert-deftest line-limit-does-not-eat-characters () + (should + (equal (with-temp-buffer + (varuga-insert-calendar-line 'foo (make-string 100 ?a)) + (count-matches "a" (point-min) (point-max))) + 100))) -- cgit v1.2.3