diff options
| author | Glenn Morris | 2020-04-29 07:50:20 -0700 |
|---|---|---|
| committer | Glenn Morris | 2020-04-29 07:50:20 -0700 |
| commit | b56401f3849cf6d00717ab8a64a221f2c01455a6 (patch) | |
| tree | 936d8d0fc04faf7aa2ec069c9376a8be09ec5f79 /test | |
| parent | 17eae91cb1b45711be676bce79bcc5fcd7df2d3d (diff) | |
| parent | 2f9bfaef21043d7894334b33b8538a165250f499 (diff) | |
| download | emacs-b56401f3849cf6d00717ab8a64a221f2c01455a6.tar.gz emacs-b56401f3849cf6d00717ab8a64a221f2c01455a6.zip | |
Merge from origin/emacs-27
2f9bfaef21 (origin/emacs-27) ; Fix last change
520fd3e728 * lisp/env.el (substitute-env-vars): Doc fix. (Bug#40948)
85544f8ef5 * lisp/isearch.el: Fix lazy-highlighting and lazy-counting...
d83cc05a73 Fix error in ERC when 'erc-server-coding-system' is custom...
16fed05ba8 Avoid crashes on TTY frames with over-long compositions
0278741676 Fix typo in custom.texi
9f5ae717fb * test/lisp/simple-tests.el (with-shell-command-dont-erase...
1f76a16ed3 * lisp/image-mode.el (image-mode-map): Update menu items.
f0e1bf56f0 Fix bugs in tab-bar and tab-line and mention remaining fea...
f0b9f18457 Make shell-command tests fit for tcsh.
68f4a740a1 Remove doc duplication
ac31cd384c * etc/NEWS: Fix inconsistencies.
# Conflicts:
# etc/NEWS
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/simple-tests.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index fa71e26d21e..88be74fd2cc 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el | |||
| @@ -757,7 +757,7 @@ See Bug#21722." | |||
| 757 | ;;; Tests for shell-command-dont-erase-buffer | 757 | ;;; Tests for shell-command-dont-erase-buffer |
| 758 | 758 | ||
| 759 | (defmacro with-shell-command-dont-erase-buffer (str output-buffer-is-current &rest body) | 759 | (defmacro with-shell-command-dont-erase-buffer (str output-buffer-is-current &rest body) |
| 760 | (declare (debug (form &body)) (indent 2)) | 760 | (declare (debug (sexp form body)) (indent 2)) |
| 761 | (let ((expected (make-symbol "expected")) | 761 | (let ((expected (make-symbol "expected")) |
| 762 | (command (make-symbol "command")) | 762 | (command (make-symbol "command")) |
| 763 | (caller-buf (make-symbol "caller-buf")) | 763 | (caller-buf (make-symbol "caller-buf")) |
| @@ -766,8 +766,9 @@ See Bug#21722." | |||
| 766 | (,output-buf (if ,output-buffer-is-current ,caller-buf | 766 | (,output-buf (if ,output-buffer-is-current ,caller-buf |
| 767 | (generate-new-buffer "output-buf"))) | 767 | (generate-new-buffer "output-buf"))) |
| 768 | (emacs (expand-file-name invocation-name invocation-directory)) | 768 | (emacs (expand-file-name invocation-name invocation-directory)) |
| 769 | (,command (format "%s -Q --batch --eval \"(princ \\\"%s\\\")\"" | 769 | (,command |
| 770 | emacs ,str)) | 770 | (format "%s -Q --batch --eval %s" |
| 771 | emacs (shell-quote-argument (format "(princ %S)" ,str)))) | ||
| 771 | (inhibit-message t)) | 772 | (inhibit-message t)) |
| 772 | (unwind-protect | 773 | (unwind-protect |
| 773 | ;; Feature must work the same regardless how we specify the 2nd arg of `shell-command', ie, | 774 | ;; Feature must work the same regardless how we specify the 2nd arg of `shell-command', ie, |
| @@ -787,7 +788,7 @@ See Bug#21722." | |||
| 787 | 788 | ||
| 788 | (ert-deftest simple-tests-shell-command-39067 () | 789 | (ert-deftest simple-tests-shell-command-39067 () |
| 789 | "The output buffer is erased or not according to `shell-command-dont-erase-buffer'." | 790 | "The output buffer is erased or not according to `shell-command-dont-erase-buffer'." |
| 790 | (let ((str "foo\n")) | 791 | (let ((str "foo\\n")) |
| 791 | (dolist (output-current '(t nil)) | 792 | (dolist (output-current '(t nil)) |
| 792 | (with-shell-command-dont-erase-buffer str output-current | 793 | (with-shell-command-dont-erase-buffer str output-current |
| 793 | (let ((expected (cond ((eq shell-command-dont-erase-buffer 'erase) str) | 794 | (let ((expected (cond ((eq shell-command-dont-erase-buffer 'erase) str) |
| @@ -799,7 +800,7 @@ See Bug#21722." | |||
| 799 | 800 | ||
| 800 | (ert-deftest simple-tests-shell-command-dont-erase-buffer () | 801 | (ert-deftest simple-tests-shell-command-dont-erase-buffer () |
| 801 | "The point is set at the expected position after execution of the command." | 802 | "The point is set at the expected position after execution of the command." |
| 802 | (let* ((str "foo\n") | 803 | (let* ((str "foo\\n") |
| 803 | (expected-point `((beg-last-out . ,(1+ (length str))) | 804 | (expected-point `((beg-last-out . ,(1+ (length str))) |
| 804 | (end-last-out . ,(1+ (* 2 (length str)))) | 805 | (end-last-out . ,(1+ (* 2 (length str)))) |
| 805 | (save-point . 1)))) | 806 | (save-point . 1)))) |