aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTom Tromey2017-09-09 17:20:43 -0600
committerTom Tromey2017-09-16 21:55:05 -0600
commit9d101376b42e51007e7f83b646e172c52251ae1e (patch)
treeac684590a5f53ccb8a36b5de634503f36b072d19 /test
parent13aba24adde7e46382daa1e4f0aad194e5232b83 (diff)
downloademacs-9d101376b42e51007e7f83b646e172c52251ae1e.tar.gz
emacs-9d101376b42e51007e7f83b646e172c52251ae1e.zip
Allow smerge-keep-current to work for empty hunks
Bug#25555 * lisp/vc/smerge-mode.el (smerge-get-current): Allow point to be at match-end. * test/lisp/vc/smerge-mode-tests.el: New file.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/vc/smerge-mode-tests.el34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/lisp/vc/smerge-mode-tests.el b/test/lisp/vc/smerge-mode-tests.el
new file mode 100644
index 00000000000..204a4b93ab5
--- /dev/null
+++ b/test/lisp/vc/smerge-mode-tests.el
@@ -0,0 +1,34 @@
1;; Copyright (C) 2017 Free Software Foundation, Inc
2
3;; Maintainer: emacs-devel@gnu.org
4
5;; This file is part of GNU Emacs.
6
7;; GNU Emacs is free software: you can redistribute it and/or modify
8;; it under the terms of the GNU General Public License as published by
9;; the Free Software Foundation, either version 3 of the License, or
10;; (at your option) any later version.
11
12;; GNU Emacs is distributed in the hope that it will be useful,
13;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;; GNU General Public License for more details.
16
17;; You should have received a copy of the GNU General Public License
18;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
20;;; Code:
21
22(require 'smerge-mode)
23
24(ert-deftest smerge-mode-test-empty-hunk ()
25 "Regression test for bug #25555"
26 (with-temp-buffer
27 (insert "<<<<<<< one\n")
28 (save-excursion
29 (insert "=======\nLLL\n>>>>>>> end\n"))
30 (smerge-mode)
31 (smerge-keep-current)
32 (should (equal (buffer-substring (point-min) (point-max)) ""))))
33
34(provide 'smerge-mode-tests)