aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Kangas2023-02-27 06:30:20 +0100
committerStefan Kangas2023-02-27 06:30:20 +0100
commitc640dc9ef533c1fa68cf7b29f63a3fb32e4c3b06 (patch)
treec15d896782c119376efa5a20f74e729a0fd25c22 /test
parent6c4abbab7999f55792a323e4bb1eb55ef5a7b990 (diff)
parent267fc6d00c4db6f20da3c2d63e48a71ab70505d3 (diff)
downloademacs-c640dc9ef533c1fa68cf7b29f63a3fb32e4c3b06.tar.gz
emacs-c640dc9ef533c1fa68cf7b29f63a3fb32e4c3b06.zip
Merge from origin/emacs-29
267fc6d00c4 ruby-smie-rules: Fix misindentation of a method call afte... 0fde314f6f6 * lib-src/etags.c (process_file_name): Free malloc'ed var... dde9d149af3 ; Improve documentation of loading *.eln files 7c552be89da ; Another doc fix in eglot.el 75c65fcc98e ; Fix last change a3d15c1f749 ; Fix last change ca79b138d42 Eglot: rename and redocument encoding-related functions (... 3e3e6d71be7 Eglot: support positionEncoding LSP capability (bug#61726) b0e87e930e8 Eglot: use faster strategy for moving to LSP positions (b... 5b174b96834 Fix mule-tests in UTF-8 locales 5256392a7ec Fix 'vertical-motion' when display strings are around 0db88d625a7 ; * src/treesit.c (treesit_predicate_match): Fix typo.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/international/mule-tests.el7
-rw-r--r--test/lisp/progmodes/eglot-tests.el10
-rw-r--r--test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb4
3 files changed, 13 insertions, 8 deletions
diff --git a/test/lisp/international/mule-tests.el b/test/lisp/international/mule-tests.el
index 6b76e35ae22..3e0c5bf9f4b 100644
--- a/test/lisp/international/mule-tests.el
+++ b/test/lisp/international/mule-tests.el
@@ -119,9 +119,10 @@ provide HTML fragments. Some tests override those variables."
119(ert-deftest sgml-html-meta-no-post-less-than-10lines () 119(ert-deftest sgml-html-meta-no-post-less-than-10lines ()
120 "No '</head>', detect charset in the first 10 lines." 120 "No '</head>', detect charset in the first 10 lines."
121 (let ((sgml-html-meta-post "")) 121 (let ((sgml-html-meta-post ""))
122 (should (eq 'utf-8 (sgml-html-meta-run 122 (should (eq 'utf-8 (coding-system-base
123 (concat "\n\n\n\n\n\n\n\n\n" 123 (sgml-html-meta-run
124 "<meta charset='utf-8'>")))))) 124 (concat "\n\n\n\n\n\n\n\n\n"
125 "<meta charset='utf-8'>")))))))
125 126
126(ert-deftest sgml-html-meta-no-post-10lines () 127(ert-deftest sgml-html-meta-no-post-10lines ()
127 "No '</head>', do not detect charset after the first 10 lines." 128 "No '</head>', do not detect charset after the first 10 lines."
diff --git a/test/lisp/progmodes/eglot-tests.el b/test/lisp/progmodes/eglot-tests.el
index 4b6528351b2..5d5de59a19a 100644
--- a/test/lisp/progmodes/eglot-tests.el
+++ b/test/lisp/progmodes/eglot-tests.el
@@ -856,8 +856,8 @@ pylsp prefers autopep over yafp, despite its README stating the contrary."
856 '((c-mode . ("clangd"))))) 856 '((c-mode . ("clangd")))))
857 (with-current-buffer 857 (with-current-buffer
858 (eglot--find-file-noselect "project/foo.c") 858 (eglot--find-file-noselect "project/foo.c")
859 (setq-local eglot-move-to-column-function #'eglot-move-to-lsp-abiding-column) 859 (setq-local eglot-move-to-linepos-function #'eglot-move-to-utf-16-linepos)
860 (setq-local eglot-current-column-function #'eglot-lsp-abiding-column) 860 (setq-local eglot-current-linepos-function #'eglot-utf-16-linepos)
861 (eglot--sniffing (:client-notifications c-notifs) 861 (eglot--sniffing (:client-notifications c-notifs)
862 (eglot--tests-connect) 862 (eglot--tests-connect)
863 (end-of-line) 863 (end-of-line)
@@ -866,12 +866,12 @@ pylsp prefers autopep over yafp, despite its README stating the contrary."
866 (eglot--wait-for (c-notifs 2) (&key params &allow-other-keys) 866 (eglot--wait-for (c-notifs 2) (&key params &allow-other-keys)
867 (should (equal 71 (cadddr (cadadr (aref (cadddr params) 0)))))) 867 (should (equal 71 (cadddr (cadadr (aref (cadddr params) 0))))))
868 (beginning-of-line) 868 (beginning-of-line)
869 (should (eq eglot-move-to-column-function #'eglot-move-to-lsp-abiding-column)) 869 (should (eq eglot-move-to-linepos-function #'eglot-move-to-utf-16-linepos))
870 (funcall eglot-move-to-column-function 71) 870 (funcall eglot-move-to-linepos-function 71)
871 (should (looking-at "p"))))))) 871 (should (looking-at "p")))))))
872 872
873(ert-deftest eglot-test-lsp-abiding-column () 873(ert-deftest eglot-test-lsp-abiding-column ()
874 "Test basic `eglot-lsp-abiding-column' and `eglot-move-to-lsp-abiding-column'." 874 "Test basic LSP character counting logic."
875 (skip-unless (executable-find "clangd")) 875 (skip-unless (executable-find "clangd"))
876 (eglot-tests--lsp-abiding-column-1)) 876 (eglot-tests--lsp-abiding-column-1))
877 877
diff --git a/test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb b/test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb
index 25cd8736f97..e339d229d3e 100644
--- a/test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb
+++ b/test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb
@@ -10,6 +10,10 @@ qux = 4 + 5 *
10foo = obj.bar { |m| tee(m) } + 10foo = obj.bar { |m| tee(m) } +
11 obj.qux { |m| hum(m) } 11 obj.qux { |m| hum(m) }
12 12
13some_variable = abc + some_method(
14 some_argument
15)
16
13foo. 17foo.
14 bar 18 bar
15 .baz 19 .baz