]> git.eshelyaron.com Git - emacs.git/commitdiff
; Add test for deleting multiple pairs at once
authorJoseph Turner <joseph@breatheoutbreathe.in>
Sat, 21 Sep 2024 17:23:07 +0000 (10:23 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Sep 2024 11:59:12 +0000 (13:59 +0200)
* test/lisp/electric-tests.el (electric-pair-backspace-2):
New test.  (Bug#72437)

(cherry picked from commit 0f4c09d26782835a7e31bf29c92d72a6a27a3ff1)

test/lisp/electric-tests.el

index 8d10ea80073d3527cbd78797e2767d5cb93b8d1d..55d3e149bcc157ac247155d4d4b3a0534d88c3be 100644 (file)
@@ -537,6 +537,14 @@ baz\"\""
       (electric-pair-delete-pair 1)
       (should (equal "" (buffer-string))))))
 
+(ert-deftest electric-pair-backspace-2 ()
+  (save-electric-modes
+   (with-temp-buffer
+     (insert "((()))")
+     (goto-char 4)
+     (electric-pair-delete-pair 2)
+     (should (equal "()" (buffer-string))))))
+
 \f
 ;;; Undoing
 (ert-deftest electric-pair-undo-unrelated-state ()