diff options
| author | Glenn Morris | 2019-09-15 16:38:23 -0700 |
|---|---|---|
| committer | Glenn Morris | 2019-09-15 16:38:23 -0700 |
| commit | a625ca5c2675a41c5c0d277def6b8cb4f4c4d6db (patch) | |
| tree | 80a22e6d963bd93ba62c6df48e26aec7eecbbfa4 /test | |
| parent | 211dc01a7bfac81281fa80e45e21157fc0c25b26 (diff) | |
| parent | 30c4f35a6fc8a6507930923766c3126ac1c2063f (diff) | |
| download | emacs-a625ca5c2675a41c5c0d277def6b8cb4f4c4d6db.tar.gz emacs-a625ca5c2675a41c5c0d277def6b8cb4f4c4d6db.zip | |
Merge from origin/emacs-26
30c4f35 (origin/emacs-26) query-replace-regexp undo: Update next-repl...
c596be0 Amend the menu caption for page "Display Property" in the Eli...
13b9510 Add description of chinese-sisheng
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/replace-tests.el | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/lisp/replace-tests.el b/test/lisp/replace-tests.el index f7bf2d93658..f42d47c2bfb 100644 --- a/test/lisp/replace-tests.el +++ b/test/lisp/replace-tests.el | |||
| @@ -514,7 +514,9 @@ Return the last evalled form in BODY." | |||
| 514 | (should | 514 | (should |
| 515 | (replace-tests-with-undo | 515 | (replace-tests-with-undo |
| 516 | input "theorem \\([0-9]+\\)" | 516 | input "theorem \\([0-9]+\\)" |
| 517 | "theorem \\\\ref{theo_\\1}" | 517 | '(replace-eval-replacement |
| 518 | replace-quote | ||
| 519 | (format "theorem \\\\ref{theo_%d}" (1+ (string-to-number (match-string 1))))) | ||
| 518 | ((?\s . (1 2)) (?U . (3))) | 520 | ((?\s . (1 2)) (?U . (3))) |
| 519 | ?q | 521 | ?q |
| 520 | (string= input (buffer-string))))) | 522 | (string= input (buffer-string))))) |
| @@ -530,4 +532,18 @@ Return the last evalled form in BODY." | |||
| 530 | ?q | 532 | ?q |
| 531 | (string= expected (buffer-string)))))) | 533 | (string= expected (buffer-string)))))) |
| 532 | 534 | ||
| 535 | (ert-deftest query-replace-undo-bug37287 () | ||
| 536 | "Test for https://debbugs.gnu.org/37287 ." | ||
| 537 | (let ((input "foo-1\nfoo-2\nfoo-3") | ||
| 538 | (expected "foo-2\nfoo-2\nfoo-3")) | ||
| 539 | (should | ||
| 540 | (replace-tests-with-undo | ||
| 541 | input "\\([0-9]\\)" | ||
| 542 | '(replace-eval-replacement | ||
| 543 | replace-quote | ||
| 544 | (format "%d" (1+ (string-to-number (match-string 1))))) | ||
| 545 | ((?\s . (1 2 4)) (?U . (3))) | ||
| 546 | ?q | ||
| 547 | (string= expected (buffer-string)))))) | ||
| 548 | |||
| 533 | ;;; replace-tests.el ends here | 549 | ;;; replace-tests.el ends here |