aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Kangas2023-01-03 06:30:17 +0100
committerStefan Kangas2023-01-03 06:30:17 +0100
commit55e41707ea727ea4b5c4d3c85f68b62e32dcdfb5 (patch)
tree436b76d5358aa17d126090d63691a7661cc93f20 /test
parent2ee6012b3faaf12710ec63626795148caeef0f6a (diff)
parent6dd3e352f44eb402c9b76c8f6e5bef032317cc55 (diff)
downloademacs-55e41707ea727ea4b5c4d3c85f68b62e32dcdfb5.tar.gz
emacs-55e41707ea727ea4b5c4d3c85f68b62e32dcdfb5.zip
Merge from origin/emacs-29
6dd3e352f44 Extract common code into ruby-base-mode to derive from 94e330243e1 ruby-ts-mode: Indentation fixes 9b24417dda8 ruby-ts--font-lock-settings: Use more standard faces 9e6536e4d96 ruby-ts-mode: Standardize the string literal highlights 1a9a1fdebf6 Improve fontification in java-ts-mode (bug#60492) dfdf9c21cbe Fontification improvements in typescript-ts-mode (bug#60500) 68e68dfeefe Improve fontification consistency in js-ts-mode (bug#60503) aef869e74f4 ; Update tree-sitter manual 4ef12cfb1fc ; Fix tree-sitter manual title case aab8ddca5e1 ; nt/INSTALL: Update for Emacs 29. 809fbb0e8c4 ; Update copyright notice in tramp-sh.el f8f5202487c (typescript/tsx-ts-mode): Split font-lock feature list in... a86a213e1ac js-ts-mode: Move 'string-interpolation' to font-lock level 3 d26b523886e Fix shrinking of the tab-bar 3f7ea621b90 ; Fix typos in ruby-ts-mode.el 9599b054316 ; Skip ruby-ts tests if grammar is not available ff35ac9dfab Fix default-port regression in erc-select-read-args b7ad0b40148 ; Clarify doc strings of 'call-process' and 'call-process...
Diffstat (limited to 'test')
-rw-r--r--test/lisp/erc/erc-tests.el6
-rw-r--r--test/lisp/progmodes/ruby-ts-mode-tests.el24
2 files changed, 15 insertions, 15 deletions
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index 6807b24bfc6..85506c3d27e 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -1001,11 +1001,11 @@
1001 1001
1002(ert-deftest erc-select-read-args () 1002(ert-deftest erc-select-read-args ()
1003 1003
1004 (ert-info ("Defaults to TLS") 1004 (ert-info ("Does not default to TLS")
1005 (should (equal (ert-simulate-keys "\r\r\r\r" 1005 (should (equal (ert-simulate-keys "\r\r\r\r"
1006 (erc-select-read-args)) 1006 (erc-select-read-args))
1007 (list :server "irc.libera.chat" 1007 (list :server "irc.libera.chat"
1008 :port 6697 1008 :port 6667
1009 :nick (user-login-name) 1009 :nick (user-login-name)
1010 :password nil)))) 1010 :password nil))))
1011 1011
@@ -1036,7 +1036,7 @@
1036 :password nil)))) 1036 :password nil))))
1037 1037
1038 (ert-info ("Address includes nick and password") 1038 (ert-info ("Address includes nick and password")
1039 (should (equal (ert-simulate-keys "nick:sesame@localhost:6667\r" 1039 (should (equal (ert-simulate-keys "nick:sesame@localhost:6667\r\r"
1040 (erc-select-read-args)) 1040 (erc-select-read-args))
1041 (list :server "localhost" 1041 (list :server "localhost"
1042 :port 6667 1042 :port 6667
diff --git a/test/lisp/progmodes/ruby-ts-mode-tests.el b/test/lisp/progmodes/ruby-ts-mode-tests.el
index f48d0bf6330..aa1ab1e2605 100644
--- a/test/lisp/progmodes/ruby-ts-mode-tests.el
+++ b/test/lisp/progmodes/ruby-ts-mode-tests.el
@@ -44,7 +44,7 @@ The whitespace before and including \"|\" on each line is removed."
44 (apply 'format (replace-regexp-in-string "^[ \t]*|" "" s) args)) 44 (apply 'format (replace-regexp-in-string "^[ \t]*|" "" s) args))
45 45
46(ert-deftest ruby-ts-indent-simple () 46(ert-deftest ruby-ts-indent-simple ()
47 (skip-unless (treesit-available-p)) 47 (skip-unless (treesit-ready-p 'ruby t))
48 (ruby-ts-should-indent-buffer 48 (ruby-ts-should-indent-buffer
49 "if foo 49 "if foo
50 | bar 50 | bar
@@ -58,7 +58,7 @@ The whitespace before and including \"|\" on each line is removed."
58 |")) 58 |"))
59 59
60(ert-deftest ruby-ts-align-to-stmt-keywords-t () 60(ert-deftest ruby-ts-align-to-stmt-keywords-t ()
61 (skip-unless (treesit-available-p)) 61 (skip-unless (treesit-ready-p 'ruby t))
62 (let ((ruby-align-to-stmt-keywords t)) 62 (let ((ruby-align-to-stmt-keywords t))
63 (ruby-ts-should-indent-buffer 63 (ruby-ts-should-indent-buffer
64 "foo = if bar? 64 "foo = if bar?
@@ -94,7 +94,7 @@ The whitespace before and including \"|\" on each line is removed."
94 )) 94 ))
95 95
96(ert-deftest ruby-ts-align-to-stmt-keywords-case () 96(ert-deftest ruby-ts-align-to-stmt-keywords-case ()
97 (skip-unless (treesit-available-p)) 97 (skip-unless (treesit-ready-p 'ruby t))
98 (let ((ruby-align-to-stmt-keywords '(case))) 98 (let ((ruby-align-to-stmt-keywords '(case)))
99 (ruby-ts-should-indent-buffer 99 (ruby-ts-should-indent-buffer
100 "b = case a 100 "b = case a
@@ -111,7 +111,7 @@ The whitespace before and including \"|\" on each line is removed."
111 | end"))) 111 | end")))
112 112
113(ert-deftest ruby-ts-add-log-current-method-examples () 113(ert-deftest ruby-ts-add-log-current-method-examples ()
114 (skip-unless (treesit-available-p)) 114 (skip-unless (treesit-ready-p 'ruby t))
115 (let ((pairs '(("foo" . "#foo") 115 (let ((pairs '(("foo" . "#foo")
116 ("C.foo" . ".foo") 116 ("C.foo" . ".foo")
117 ("self.foo" . ".foo") 117 ("self.foo" . ".foo")
@@ -134,7 +134,7 @@ The whitespace before and including \"|\" on each line is removed."
134 (format "M::C%s" value)))))))) 134 (format "M::C%s" value))))))))
135 135
136(ert-deftest ruby-ts-add-log-current-method-outside-of-method () 136(ert-deftest ruby-ts-add-log-current-method-outside-of-method ()
137 (skip-unless (treesit-available-p)) 137 (skip-unless (treesit-ready-p 'ruby t))
138 (ruby-ts-with-temp-buffer (ruby-ts-test-string 138 (ruby-ts-with-temp-buffer (ruby-ts-test-string
139 "module M 139 "module M
140 | class C 140 | class C
@@ -147,7 +147,7 @@ The whitespace before and including \"|\" on each line is removed."
147 (should (string= (ruby-ts-add-log-current-function) "M::C")))) 147 (should (string= (ruby-ts-add-log-current-function) "M::C"))))
148 148
149(ert-deftest ruby-ts-add-log-current-method-in-singleton-class () 149(ert-deftest ruby-ts-add-log-current-method-in-singleton-class ()
150 (skip-unless (treesit-available-p)) 150 (skip-unless (treesit-ready-p 'ruby t))
151 (ruby-ts-with-temp-buffer (ruby-ts-test-string 151 (ruby-ts-with-temp-buffer (ruby-ts-test-string
152 "class C 152 "class C
153 | class << self 153 | class << self
@@ -160,7 +160,7 @@ The whitespace before and including \"|\" on each line is removed."
160 (should (string= (ruby-ts-add-log-current-function) "C.foo")))) 160 (should (string= (ruby-ts-add-log-current-function) "C.foo"))))
161 161
162(ert-deftest ruby-ts-add-log-current-method-namespace-shorthand () 162(ert-deftest ruby-ts-add-log-current-method-namespace-shorthand ()
163 (skip-unless (treesit-available-p)) 163 (skip-unless (treesit-ready-p 'ruby t))
164 (ruby-ts-with-temp-buffer (ruby-ts-test-string 164 (ruby-ts-with-temp-buffer (ruby-ts-test-string
165 "class C::D 165 "class C::D
166 | def foo 166 | def foo
@@ -171,7 +171,7 @@ The whitespace before and including \"|\" on each line is removed."
171 (should (string= (ruby-ts-add-log-current-function) "C::D#foo")))) 171 (should (string= (ruby-ts-add-log-current-function) "C::D#foo"))))
172 172
173(ert-deftest ruby-ts-add-log-current-method-after-inner-class () 173(ert-deftest ruby-ts-add-log-current-method-after-inner-class ()
174 (skip-unless (treesit-available-p)) 174 (skip-unless (treesit-ready-p 'ruby t))
175 (ruby-ts-with-temp-buffer (ruby-ts-test-string 175 (ruby-ts-with-temp-buffer (ruby-ts-test-string
176 "module M 176 "module M
177 | class C 177 | class C
@@ -186,7 +186,7 @@ The whitespace before and including \"|\" on each line is removed."
186 (should (string= (ruby-ts-add-log-current-function) "M::C#foo")))) 186 (should (string= (ruby-ts-add-log-current-function) "M::C#foo"))))
187 187
188(ert-deftest ruby-ts-add-log-current-method-after-inner-class-outside-methods () 188(ert-deftest ruby-ts-add-log-current-method-after-inner-class-outside-methods ()
189 (skip-unless (treesit-available-p)) 189 (skip-unless (treesit-ready-p 'ruby t))
190 (ruby-ts-with-temp-buffer (ruby-ts-test-string 190 (ruby-ts-with-temp-buffer (ruby-ts-test-string
191 "module M 191 "module M
192 | class C 192 | class C
@@ -201,7 +201,7 @@ The whitespace before and including \"|\" on each line is removed."
201 (should (string= (ruby-ts-add-log-current-function) "M::C")))) 201 (should (string= (ruby-ts-add-log-current-function) "M::C"))))
202 202
203(ert-deftest ruby-ts-add-log-current-method-after-inner-class-outside-methods-with-text () 203(ert-deftest ruby-ts-add-log-current-method-after-inner-class-outside-methods-with-text ()
204 (skip-unless (treesit-available-p)) 204 (skip-unless (treesit-ready-p 'ruby t))
205 (ruby-ts-with-temp-buffer (ruby-ts-test-string 205 (ruby-ts-with-temp-buffer (ruby-ts-test-string
206 "module M 206 "module M
207 | class C 207 | class C
@@ -215,7 +215,7 @@ The whitespace before and including \"|\" on each line is removed."
215 (should (string= (ruby-ts-add-log-current-function) "M::C")))) 215 (should (string= (ruby-ts-add-log-current-function) "M::C"))))
216 216
217(ert-deftest ruby-ts-add-log-current-method-after-endless-method () 217(ert-deftest ruby-ts-add-log-current-method-after-endless-method ()
218 (skip-unless (treesit-available-p)) 218 (skip-unless (treesit-ready-p 'ruby t))
219 (ruby-ts-with-temp-buffer (ruby-ts-test-string 219 (ruby-ts-with-temp-buffer (ruby-ts-test-string
220 "module M 220 "module M
221 | class C 221 | class C
@@ -237,7 +237,7 @@ The whitespace before and including \"|\" on each line is removed."
237(defmacro ruby-ts-deftest-indent (file) 237(defmacro ruby-ts-deftest-indent (file)
238 `(ert-deftest ,(intern (format "ruby-ts-indent-test/%s" file)) () 238 `(ert-deftest ,(intern (format "ruby-ts-indent-test/%s" file)) ()
239 ;; :tags '(:expensive-test) 239 ;; :tags '(:expensive-test)
240 (skip-unless (treesit-available-p)) 240 (skip-unless (treesit-ready-p 'ruby t))
241 (let ((buf (find-file-noselect (ruby-ts-resource-file ,file)))) 241 (let ((buf (find-file-noselect (ruby-ts-resource-file ,file))))
242 (unwind-protect 242 (unwind-protect
243 (with-current-buffer buf 243 (with-current-buffer buf