From 342fc823a6622f25c79baa8535cb9ea939ef666f Mon Sep 17 00:00:00 2001 From: Andreas Politz Date: Thu, 5 Oct 2017 20:40:31 +0200 Subject: [PATCH] Add test exposing overlay bug * test/src/buffer-tests.el (overlay-autogenerated-test-64): New test. --- test/src/buffer-tests.el | 101 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el index e3bc2c5dfcb..c2c9d060336 100644 --- a/test/src/buffer-tests.el +++ b/test/src/buffer-tests.el @@ -7577,4 +7577,105 @@ with parameters from the *Messages* buffer modification." (25 . 32) (25 . 84)))))) +(ert-deftest overlay-autogenerated-test-64 nil + (with-temp-buffer + (insert "................................................................") + (make-overlay 31 10 nil nil nil) + (make-overlay 17 58 nil nil t) + (make-overlay 20 21 nil t nil) + (make-overlay 3 47 nil t t) + (make-overlay 47 43 nil t t) + (make-overlay 54 8 nil nil t) + (make-overlay 51 26 nil t nil) + (make-overlay 60 14 nil t nil) + (make-overlay 38 6 nil nil t) + (make-overlay 41 9 nil nil nil) + (make-overlay 44 38 nil nil t) + (make-overlay 55 48 nil nil t) + (make-overlay 10 41 nil nil t) + (make-overlay 35 49 nil t nil) + (make-overlay 50 46 nil nil nil) + (make-overlay 28 28 nil t nil) + (goto-char 59) + (delete-char 3) + (goto-char 28) + (widen) + (narrow-to-region 13 7) + (goto-char 11) + (insert ".") + (goto-char 9) + (delete-char 3) + (goto-char 8) + (delete-char 0) + (goto-char 7) + (insert ".............") + (goto-char 9) + (insert "..........") + (goto-char 22) + (delete-char 1) + (goto-char 31) + (delete-char 2) + (goto-char 22) + (insert ".........") + (goto-char 33) + (delete-char 1) + (goto-char 29) + (widen) + (narrow-to-region 59 51) + (goto-char 52) + (insert ".........") + (goto-char 53) + (insert "........") + (goto-char 53) + (delete-char 4) + (goto-char 54) + (insert "........") + (goto-char 53) + (insert "....") + (goto-char 75) + (widen) + (goto-char 70) + (delete-char 2) + (goto-char 108) + (delete-char 1) + (goto-char 80) + (widen) + (goto-char 70) + (widen) + (narrow-to-region 49 63) + (goto-char 49) + (insert "...") + (goto-char 66) + (delete-char 0) + (goto-char 63) + (delete-char 3) + (goto-char 59) + (insert "..........") + (goto-char 56) + (delete-char 6) + (goto-char 60) + (insert ".........") + (goto-char 62) + (widen) + (goto-char 58) + (insert ".............") + (goto-char 105) + (widen) + (narrow-to-region 94 109) + (goto-char 103) + (insert "............") + (should + (equal + (test-overlay-regions) + '((3 . 134) + (6 . 125) + (38 . 141) + (39 . 118) + (39 . 128) + (39 . 128) + (40 . 146) + (43 . 145) + (101 . 138) + (103 . 103)))))) + ;;; buffer-tests.el ends here -- 2.39.2