From 11ffcb989b1176d258e47317fc09655a0c93af20 Mon Sep 17 00:00:00 2001 From: theothornhill Date: Sat, 4 Jan 2020 06:35:29 +0100 Subject: [PATCH] testing getting column --- eglot-tests.el | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/eglot-tests.el b/eglot-tests.el index 80266d70..595acddc 100644 --- a/eglot-tests.el +++ b/eglot-tests.el @@ -639,6 +639,8 @@ pyls prefers autopep over yafp, despite its README stating the contrary." (("foo.c" . "const char write_data[] = u8\"🚂🚃🚄🚅🚆🚈🚇🚈🚉🚊🚋🚌🚎🚝🚞🚟🚠🚡🛤🛲\";")))) (let ((eglot-server-programs '((c-mode . ("clangd"))))) + (setq eglot-move-to-column-function #'eglot-move-to-lsp-abiding-column + eglot-current-column-function #'eglot-lsp-abiding-column) (with-current-buffer (eglot--find-file-noselect "project/foo.c") (eglot--sniffing (:client-notifications c-notifs) @@ -647,17 +649,10 @@ pyls prefers autopep over yafp, despite its README stating the contrary." (insert "p") (eglot--signal-textDocument/didChange) (eglot--wait-for (c-notifs 2) (&key params &allow-other-keys) - (should (equal '(:range - (:start - (:line 0 :character 71) - :end - (:line 0 :character 71)) - :rangeLength 0 :text "p") - (aref (cadddr params) 0)))) - (eglot-move-to-lsp-abiding-column 72) + (should (equal 71 (cadddr (cadadr (aref (cadddr params) 0)))))) + (eglot-move-to-lsp-abiding-column 71) (should (string= (thing-at-point 'symbol t) "p"))))))) - (ert-deftest eglot-ensure () "Test basic `eglot-ensure' functionality" (skip-unless (executable-find "pyls"))